Question Locked

Access VBA - Sequential Numbering

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

Hi, I am new to the Access scene and would appreciate any help you could offer.
I have a very simple form containing 3 fields "project", "ID", "Ref"
The ID feild is the PK in a table "tblRaail"
What I require is to search the "Ref" per "Project" number and increment (+1) for a new record.

This is what I have come up with so far, but it returns nothing, please help.

NextID = DLookup("[ProjectNumber]", "tblRail", DMax("Ref", "tblRail") + 1)

1 reply

This discussion is closed to new replies.