Incrementing a field

Robbieb29

Registered User.
Local time
Today, 22:07
Joined
Nov 17, 2009
Messages
13
Hi

I have a field in my Table called EQUIPMENTNO and I would like the user to enter a number in the form field EQUIPMENTNUMBER. After all the associated dater is enter the user presses new record and I would like the Equipment number be incremented by one and displayed in the form so the user can enter the next details associated with this equipment number.

The user has a real of numbers and has to put these on the appliance and they run in number order. All details associated with that number are entered.

I have attached the dbase

Please Help, thanks Rob
 

Attachments

try setting the default value in field EQUIPMENTNO to

=DMax("EQUIPMENTNO","ASSETT1")+1

that's what i did.
 
Just to clarify, when you open the form and start to enter records, do you want the numbers to pick up from where you left off in your last session? Or are these series of numbers only continuous within a given session?

If the former, hokkienmee's suggestion should work (assuming that EquipmentNo actually is defined as a Number Datatype and not as Text that happens to be all digits) but if your number for a given session has nothing to do with previous entries, you need to use the EquipmentNo_AfterUpdate() event to set the EquipmentNo.DefaultValue property.
 
Thankyou

Thats was driving me mad, so many people telling me different things.

Thanks Again Rob
 

Users who are viewing this thread

Back
Top Bottom