Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

generate random number

Discussion in 'Information Technology' started by Kirt84, Jul 28, 2006.

  1. Kirt84

    Kirt84
    Expand Collapse
    Guest

    I require a function where Access will generate an Autonumber with each
    number beginning with the letters 'BNS'; I would like about 8 numbers after
    this. Also the numbers have to be unique. I am still a novice in Access so if
    someone can give me a step by step guide it would be great!
    --
    Thank you for your help
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Punjab to use vacant land to generate revenues (New Kerala) Breaking News Feb 19, 2008
    Is miracle less about randomness and more about faith ? Intellectual Articles Oct 14, 2015
    Christianity Pope: Humanity isn't random product of evolution Interfaith Dialogues Apr 24, 2011
    Random Process in Sikhism Sikh Sikhi Sikhism Aug 20, 2008
    Random of Act of kindness... Inspirational Stories Mar 25, 2008

  3. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Kirt84 wrote:
    > I require a function where Access will generate an Autonumber with
    > each number beginning with the letters 'BNS'; I would like about 8
    > numbers after this. Also the numbers have to be unique. I am still a
    > novice in Access so if someone can give me a step by step guide it
    > would be great!


    No what you want is a random number (autonumber will generate one) and
    then you want to DISPLAY that number with the letters "BNS" in front of it.
    Don't bother trying to store the "BNS" in a table as there is no need to.
    There are several ways of displaying the BNS depending on where you will
    need it.

    Note: the user should never see the table directly or enter or edit data
    there. They should only see data in forms, reports and maybe queries.
    Tables are only buckets of data and a list of field definitions.

    --
    Joseph Meehan

    Dia duit
     
  4. Kirt84

    Kirt84
    Expand Collapse
    Guest

    Thanks, but how do I have the letters in front of the Autonumber???
    --
    Thank you for your help


    "Joseph Meehan" wrote:

    > Kirt84 wrote:
    > > I require a function where Access will generate an Autonumber with
    > > each number beginning with the letters 'BNS'; I would like about 8
    > > numbers after this. Also the numbers have to be unique. I am still a
    > > novice in Access so if someone can give me a step by step guide it
    > > would be great!

    >
    > No what you want is a random number (autonumber will generate one) and
    > then you want to DISPLAY that number with the letters "BNS" in front of it.
    > Don't bother trying to store the "BNS" in a table as there is no need to.
    > There are several ways of displaying the BNS depending on where you will
    > need it.
    >
    > Note: the user should never see the table directly or enter or edit data
    > there. They should only see data in forms, reports and maybe queries.
    > Tables are only buckets of data and a list of field definitions.
    >
    > --
    > Joseph Meehan
    >
    > Dia duit
    >
    >
    >
     
  5. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Control: DisplayNum ControlSource: ="BSN" & Format([IDField],"00000000")
    Note you may have to use ';' instead of ',' dependant on the windows
    regional setting
    & swap [IDField] for the actual Field

    Pieter

    "Kirt84" <Kirt84@discussions.microsoft.com> wrote in message
    news:555BEA73-3687-4460-A984-B91282EE6771@microsoft.com...
    > Thanks, but how do I have the letters in front of the Autonumber???
    > --
    > Thank you for your help
    >
    >
    > "Joseph Meehan" wrote:
    >
    >> Kirt84 wrote:
    >> > I require a function where Access will generate an Autonumber with
    >> > each number beginning with the letters 'BNS'; I would like about 8
    >> > numbers after this. Also the numbers have to be unique. I am still a
    >> > novice in Access so if someone can give me a step by step guide it
    >> > would be great!

    >>
    >> No what you want is a random number (autonumber will generate one)
    >> and
    >> then you want to DISPLAY that number with the letters "BNS" in front of
    >> it.
    >> Don't bother trying to store the "BNS" in a table as there is no need to.
    >> There are several ways of displaying the BNS depending on where you will
    >> need it.
    >>
    >> Note: the user should never see the table directly or enter or edit
    >> data
    >> there. They should only see data in forms, reports and maybe queries.
    >> Tables are only buckets of data and a list of field definitions.
    >>
    >> --
    >> Joseph Meehan
    >>
    >> Dia duit
    >>
    >>
    >>


    --------------------------------------------------------------------------------
    I am using the free version of SPAMfighter for private users.
    It has removed 4382 spam emails to date.
    Paying users do not have this message in their emails.
    Try SPAMfighter for free now!
     

Share This Page