Hi,
I'm trying to use DMax to auto increment a field (CustID, a longInt) and enter the value automatically when a new record is created in Customers Table (can't use AutoNumber in this particular situation) so the code I've written is this:
Me.CustID = DMax("CustID", "tblCustomers") + 1
I've stumbled across two problems. One, the code doesn't seem to be doing what I hoped it would and two, I'm unsure where to insert this code.
Should it go into the controls events, or the forms events, and which event should I use? Apologies if I seem dim, but I appreciate some help.
Thanks.