EmployeeID

smallWorld

Registered User.
Local time
Tomorrow, 05:12
Joined
Jan 10, 2008
Messages
15
Will someone pls reply? This's really urgent! Thx.

I have a table called EmployeeDetail. It has a auto number field name called EmployeeAutoNo. For instance, the last EmployeeAutoNo is 3.

On my form, I have a textbox field called EmployeeID.

When user click on the NEW button, it will take the last EmployeeAutoNo: 3, and display it as ABC/4/2008. (FYI: ABC and 2008 is fixed and 4=3+1).

1) How do I code this NEW button? Do I use a variable and how do I write the value to a control or to default in the control property?

Your help will be very much appreciated. Thanks!
 
If you want the "4" part of this code ABC/4/2008 to increment with no numbers missing from the series then don't base it on the auto number field as you will end up with missing numbers from the series. Use something like DMax to find their last highest number in the series and add one to that. This is still not foolproof in a multi user environment. There's been a lot of discussion on it In the forum.
 

Users who are viewing this thread

Back
Top Bottom