Max with a condition

  • Thread starter Thread starter guat
  • Start date Start date
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!
 
Put the criteria in the DMax call:
Me.HRID = DMax("[ID Template]", "Offer Letter Information", "[ID
Template] < 5000") + 1
 
Back
Top