Field Value based on highest value

S

Simon

I have a data entry form and in one of the text boxes i want the default
value to appear as the next highest number in this field.

e.g The field name is Pnumber and if the highest value in this field is
10856, when I open the form to input data i want 10857 to appear in the text
box. I want the user to be able to change this number if they want.
 
M

MikeJohnB

Me.Pnumber.DefaultValue = DMax("Pnumber", "[YourTableNameHere]") + 1

[Brackets only needed if there is a gap in the "Table Name"]

try on load event or on open event of the form. Because it is only the
default value you are setting, the user can change the value by entering a
new value in the field.

Does this help?????

Kindest regards
 
Top