Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: Numbering problems

    I have a form with a subform which is a table of items ordered. I want to have a column in the subform the give the item number which increments for each different item ordered. I basically want a line number for the order form. I currently have it setup using a field called ItemNumber which is data type autonumber. The problem is ItemNumber is not reset to 1 when a new form is started but rather it is keeping track of the number of different items order between records. Should I be using a different command or is there a way to tweak the autonumber to work the way I want?


  2. #2
    Join Date
    Jan 2004
    Islamabad, Pakistan
    Autonumber is self incrementing but it can't have the duplicates values so it won't help to store the line numbers. You should use number-long for this and you might've to write custom function to return the correct line number for that order and migh've to call this function from the after insert event of the sub form, but please consider this also if an item is deleted from the sub form - do You want to renumber the list or not?

    - Saqib

Posting Permissions

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