Access VBA - Sequential Numbering - TechRepublic
Question
January 13, 2010 at 12:33 AM
brian.ramshaw

Access VBA – Sequential Numbering

by brian.ramshaw . Updated 16 years, 6 months ago

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)

This discussion is locked

All Comments