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

Generating Workorder Number

Status
Not open for further replies.

gmagerr

Technical User
Aug 11, 2001
323
US
Hi guys, i'm developing ASP pages and using Access 2000. I have a page where my company can enter job info that's put into a database. I'd like to be able to have the database automatically create a workorder number and then every time someone enters a new workorder, the number would increment by 1. i'd like to start the numbers at 2600 for instance. can i do this without using autonumber? thanks in advance.
 
You can create a function which is going to return the new workorder number. Inside the function just open the table that holds all the workorders that you have so far, sort it ascending, go to the last record, pick the workorder number, incremented by 1 and make the result the return value of the function. Than assign this function where ever you need it.
 
DMax("[workorder]","Tablename")+1 would be the function you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top