Discussion Locked

Access 97 Maximum Function

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a Access 97 Database. One of the fields is ID Number. I use 1 -9999 for temporary users and 100,000 to 999,999 for regular users.

When I want to set up a new Temporary user, I want the program to give me the maximum number BUT in the rangeof 1-9999 ONLY!!!
When I use the Maximum function, it gives me the highest number used in the entire user ID range.

Any help would be greatly appreciated!

Alan
abramowitza@coned.com

3 replies

by dklippert

You can set up a Query with the ID field included twice. In one field use the MAX function and in the other use <9999 as the criteria.
Another formula is DMAX:
=DMAX("[IDs]","IDTable","[IDs] <9999")

by mra2

Doug,
Great Answer! I never heard of DMAX or DMIN until you submitted your answer!

This discussion is closed to new replies.