PDA

Click to See Complete Forum and Search --> : Create a autonumber field - HELP!!!!!


Corne
Jan 10th, 2000, 04:09 PM
I am busy working with a program but i have a problem.
I am working with job numbers and each job number is for a specific place.
81101254 - Component Shop
84101234 - Workshop (new job number here!)
81601222 - Service Dept.

NOTE that the first 3 figures differ for each department.
What must i do to create the next job number for the workshop etc. 84101235

Say I want to click on an option button and then my program must see i want to create a new job number for the work shop.

It must then update the appropiate field in the database(access)and diplay the newest job number to me in vb - odbc connectivity is used with vb6.

Any help will be appreciated. :)

Jan 10th, 2000, 08:50 PM
If you split the variable into two parts, i.e. xxx as office code, and yyyyy as job number. Then you could just find the largest job number in a specific office code, increment by 1 and display them together:

yyyyy = yyyyy + 1
test1.text = xxx + yyyyy

This may be easier with some restructuring of your DB.

------------------
Boothman
There is a war out there and it is about who controls the information, it's all about the information.