Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

next number avialable 1

Status
Not open for further replies.

kastaman

IS-IT--Management
Sep 24, 2001
181
CA
I have a table that has a field called request #. I need this number to increment to the next number after the last record has been saved. I cannot used auto number because we need to utilize each number available for tracking.

I have a form in tubular form and I have placed the script:Dmax.... on the request field but as we complete the details on the current request, the next available # does not increment, rather it shows the same current #.

Please help.

Kastaman
 
I have. The problem I'm having is when the from is in datasheet view. The next available number is selected while I'm filling in the info for the current record.

For example:
Request #1 - i'm filling in the details....
once I click on the next row (Request #2) an new row appears for the next available #, but it still selects #2
which is due to records #2 has not been saved.

How to I get access to choose the next number properly, is there a way to delay the selection of the next number until I have clicked or populated the next row?

Any help is appreciated

Kastaman.
 
In the form's before update event put...

MyTextBox = DMax...+ 1

This way the number does not get assigned until right before the record is saved. This is also good because if more than one user is updating, the (real) next number will be used.

ljprodev@yahoo.com
ProDev, MS Access Applications B-)
 
LonnieJohnson - will this work even if my form is in tubular format (like in datasheet mode)?
 
LJ - thanks for your help. Now I have peace of mind for the moment. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top