Results 1 to 2 of 2
Thread: Count? (Access 2000)
2001-08-02, 00:48 #1
- Join Date
- Feb 2001
- Louisville, Kentucky, USA
- 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>
2001-08-02, 13:28 #2
- Join Date
- Jun 2001
- Crystal Beach, FL, Florida, USA
- Thanked 33 Times in 33 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