Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2013

    Unanswered: Sequntial Numbering in A Query, Been looking no luck

    Hello all

    Not sure if this would be a query or table or whatnot.
    This is the breakdown.
    I have a PO ORDER no, with a auto number starting at 4000.
    That specific customer is ordering the following items

    item 1: 5eggs
    item 2: 6eggs

    I have the items set as auto number, and I need the po as well as auto number
    Is it possible to have two auto numbers in the same query. I've tried in several different methods. Union, joins, concatenation.

    I am sure this has been asked many times prior. But My aim is to keep both at an auto number state.

    the query will then yes, go to a form. Is this possible?
    thanks for your advice.

    I would like to make it into a query if at all possible. It can be in the form if need be.

    I don't know very much VB. I am a beginner yet in fact.
    I found a few links, but again, not sure how to implement them, Autofill a subform based on the record selected in Main form - Access World Forums

    Basically just a concatenation, is that possible? [cus_no]+1?

    also saw this in your threads.

    So I have been hunting... trying!

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    an autonumber column should have NO meaning outside the system. treat it as a mechanism that guarantees each and every row has a unique reference. if you MUST have contiguous sequential numbers then write your own routine to do that. there's plenty of example here and elsewhere
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 15
    You can have several columns referring to Autonumber columns provided that these columns are in different tables. However you cannot have more than one autonumber column defined in one table.

    Be also aware that the numbering in such columns won't necessarily remain continuous, i.e. gaps can appear in the numbering sequence, if you delete one or several rows in a table for instance. This is one of the reasons why it is not recommended to use autonumbers columns for handling user-meaningful data such as order numbers and the like.

    You can compute the next number in sequence with an expression such as:
    NextNumber = DMax(<column name>, <table name>) + 1
    where <column name> is the name of the column storing the sequential numbers and <table name> is the name of the table where <column name> is defined.

    This must be done when a new row (record) is created, i.e. in the module of a Form. Unfortunately, Access does not allows the use of such an expression in the definition of a table.
    Have a nice day!

  4. #4
    Join Date
    Jan 2013
    I've figured out the way I appreciate the help. I just created a query with
    all I needed to do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts