Max with a condition

G

guat

Hi,
I have an ID for a database that is not an auto number; I'm manually
increasing the number by 1 for the next new record as below:
Me.HRID = DMax("[ID Template]", "Offer Letter
Information") + 1

QUESTION: I want it to look at the max for only the records that are under
5,000. 5,000 is where I have started the records for a separate sub-company.
Did I describe that well?

THANK YOU!
 
K

Klatuu

Put the criteria in the DMax call:
Me.HRID = DMax("[ID Template]", "Offer Letter Information", "[ID
Template] < 5000") + 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top