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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STILL HAVING NUMBERING PROBLEMS!

Status
Not open for further replies.

csegal

Technical User
Jun 12, 2001
38
US
Hi People!
I have a simple form where I have to enter the date, a part number, a description and an "Asset #"
The "Asset#" field be the next number in sequence ie...
7607, 7608, 7609 etc for each new record should have the next number in sequence.

There are currently 3400 records in this data base.
I am using windows 98 with access 97
I have tried a suggestion by HNA:

Me.Asset # = DMax("[Asset #]", "SERIAL NUMBER LOG") + 1

The problem lies when I click on any of the previous "Asset #" fields in the records, they are revised with the next higher number and the previously assigned number is wiped out. This will not work...
I tried to use the help formulas, but it seem like GREEK to me.


Please help!
csegal@arrowair.com
 
How about checking to see if the control is blank before assigning the number? Something like this:

If IsNull(Assect #) Then
Me.Asset # = DMax("[Asset #]", "SERIAL NUMBER LOG") + 1
End If

Hope this helps.

The Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
I'LL GIVE THIS A TRY, BUT AM UN SURE WHERE EXACTLY TO PUT THIS CODE...
IN THE FORM: "ON_CURRENT" CODE EVENT PROCEDURE???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top