I have a table that contains bid information.
BidId - Autonumber
BidNumber - I want this to be a sequential number, but without skipping numbers.
Me!BidNumber = Nz(DMax("BidNumber", "tblBidLog"), 0) + 1
I originally placed the above code in the before update of the data entry form. The code works, but the "Bid Number" field is left blank since the code does not fire until the record is saved. In an attempt to fix the problem, I tried placing the code in OnCurrent, On Open, OnLoad, etc, but with no success.
I want the data entry form to open and have the next number in line in the bid number field, but when I open the form, it skip the next number and assigns what should be the next number to bid #1. Example...
Dmax is 362. The form should open to bid #363, but instead opens to bid #364. Bid # 1 is somehow converted to Bid#363, thus explaining why 364 becomes the new max number.
Start Free Trial