Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Autonumbers

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

Tags:
  1. JSAKelley

    JSAKelley
    Expand Collapse
    Guest

    I run a supply database and order from multiple companies. My users have the
    opportunity to use the database to request supplies. I have different
    tables/forms for each vendor describing what they offer. These tables/forms
    are linked together through an OrderRequest table which tracks order numbers.

    I would like to have different Order Numbers for each type of company. For
    example if an order is placed using CompanyA Form I would like the UserNumber
    (autonumber) to display something like A001, and if an order is placed using
    CompanyB Form the autonumber in OrderRequest table to display B002.

    I want these text prefixes to be embedded in the table so that I can
    reference them with queries. Anyone got any ideas?
     
  2. schasteen

    schasteen
    Expand Collapse
    Guest

    You can not do this with an autonumber. You will have to write some code in
    your forms before update to assign a number. You may want to look at your
    design if you have a different table for each vendor. If the tables are the
    same structure, you should just add an identifier to show the vendor and
    filter the forms, queries and reports how you would like to see the data.
    Right now, from what you are describing, you will have to create all new
    forms and tables to add a new vendor.

    "JSAKelley" wrote:

    > I run a supply database and order from multiple companies. My users have the
    > opportunity to use the database to request supplies. I have different
    > tables/forms for each vendor describing what they offer. These tables/forms
    > are linked together through an OrderRequest table which tracks order numbers.
    >
    > I would like to have different Order Numbers for each type of company. For
    > example if an order is placed using CompanyA Form I would like the UserNumber
    > (autonumber) to display something like A001, and if an order is placed using
    > CompanyB Form the autonumber in OrderRequest table to display B002.
    >
    > I want these text prefixes to be embedded in the table so that I can
    > reference them with queries. Anyone got any ideas?
    >
    >
     
  3. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    JSAKelley wrote:
    > I run a supply database and order from multiple companies. My users
    > have the opportunity to use the database to request supplies. I have
    > different tables/forms for each vendor describing what they offer.
    > These tables/forms are linked together through an OrderRequest table
    > which tracks order numbers.
    >
    > I would like to have different Order Numbers for each type of
    > company. For example if an order is placed using CompanyA Form I
    > would like the UserNumber (autonumber) to display something like
    > A001, and if an order is placed using CompanyB Form the autonumber in
    > OrderRequest table to display B002.
    >
    > I want these text prefixes to be embedded in the table so that I can
    > reference them with queries. Anyone got any ideas?


    First remember Autonumbers are designed to provide unique numbers. It
    in not designed to provide numbers in order and for a number of reasons may
    not do so. As a result using them in any application where the user sees
    the numbers is likely to end up with confusion.

    There are other ways of providing the numbers you want depending on the
    particual application.

    Assuming you don't mind the occasional missed number or strange number
    (I suspect someone using the database will and will bug you about it.) then
    I suggest using two fields. A letter field and the number field. Just
    display both as the User Number and don't worry that the A group may be:

    A001
    A007
    A008

    and B

    B002
    B003
    B009


    --
    Joseph Meehan

    Dia duit
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page