Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004
    Posts
    3

    Unanswered: Adding serial number in invoice items

    hi..

    in the invoice form, i have a subform to add items to the invoive, what i need to do is add a column to the items to represent the serial number (1,2,3,..) of the item in the invoice..

    how can i do that??? and is it possible to do it in query level ??


    many thanks

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Are you not using serial numbers as primary keys for your items?

    Please provide a DETAILED explaination of what have, what 's broken, and what you would like.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2004
    Posts
    3

    Question

    let's say i have a table for items:

    - code/autonumber
    - desc/text
    - price/number

    and i have another table for invoices:

    - code/autonumber
    - date/date
    - customer_name/text

    since the relationship between the two tables is many-to-many, the third table would be:

    - invoice_code/number
    - item_code/number

    now suppose i want to add serial numbers (1,2,3,...) for every group of items in the invoice.. how can i do that??? i needed to be automated, not for the user to input the numbers manually...

    note: the invoice looks something like this..

    Invoice

    Invoice #: 2341

    Date: 1 Jan 2004

    Customer: CASH


    SN Item Description Price
    -----------------------------------------
    01 2134 red toy car $ 5.00
    02 1121 blue toy car $ 5.50
    03 ...............
    ^
    what i need is the automation of these numbers



    help !

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Oh ok... that's not really a serial number though.

    What do you need to do with these numbers? Will you need to reference them for something later? The easy way out would be using line numbers at the report/form level instead of trying to stash arbitrary numbers in your database.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Sep 2004
    Posts
    3
    actually, i need to display them only..

    and also to be printed in the report..

    what do u mean by line numbers ??

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I mean you can use temporary variables to keep track of the line numbers. There are a couple of ways to do that. You could create a variable in VB and increment it during the on print event for the detail section, you could use a running sum...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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