Change starting value of an incrementing AutoNumber field

JiTS

Ciao!
Local time
Today, 05:43
Joined
Dec 12, 2003
Messages
77
Hi..

I'm trying to make a from that includes an Order Number, this ordernumber is connected to a table field "OrderNumber".

This "OrderNumber" field is an AutoNumber field. I would like it to be possible to begin the ordernummbers with 900 instead of 1.

I already saw a similar topic, with the following SQL given as an answer:

"SELECT * FROM tblRecords WHERE RecordID = "& Me.RecordID &"ORDER BY RandomGenerateNumberField DESC"

My Question:
Where should I write this SQL?
Please HELP..

Greetings,
JiTS
 
Try here for a start

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=45181

One thing I have done is to create a form to hold bits of BS information, like What No to start Order No's at, What No to start Job No's at etc, then when the Db is opened, on the first form that is loaded place in the on load event

DoCmd.OpenForm "frmSettings", , , , , acHidden

I usually design a 'Splash' form that displays for a few seconds that loads all this sort of stuff.

Then on your forms etc add a text box with the control source set to something like

=[ServiceID]+[Forms]![frmSettings]!SettingJobNo

That way if some one else starts using your app they can start at any no you like.
 

Users who are viewing this thread

Back
Top Bottom