Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Count? (Access 2000)

    <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

    OK...probably elementary to you all...

    For example, imagaine a check numbering process. As a check is issued, a check number is assigned to the check. i.e. if the first check issued is 1000 then the second check issued would be 1001.

    What must I do to develop a method to start at say 1000 and for each new entry increment it by 1.

    Hope I made myself clear ... and hope someone has an answer.

    Thanks,
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Count? (Access 2000)

    Given the circumstances, the best way is to use the DMax function. You lookup the highest checkNo value in your table, then you add one to it. The code below would handle this, and it uses the NZ function to start at 1000 if the check table is empty.

    NewCheckNo = NZ(DMax("checkno","tblChecks"),1000) + 1
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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