View Full Version : Inserting data


StuartKnox79
08-29-2001, 07:24 AM
I have a form that I use to generate an unique numeric ID number (PRMRefNo) for each new request we get in ( as well as store other data on it). I did this by setting its control source as =ID+10000 (ID being an autonumber field) I cant however get the calculated number into the table. It shows on the datasheet of the form, but in the table (inbook) its comes up as 0, and as PrmRefNo is set to be unique (and is also used to print as part of a mail merge) I cannot add more than 1 record.

PrmRefNo must start at 10000 (due to leading on from an old paper based system), must be unique, and must be able to be printed as part of a mail merge docuement.

I have found these boards to be extremely helpful with other problems I have had, and any input would be useful, as I have been tearing my hair out over this problem ( and the everpresent deadline looms)

Stuart

Pat Hartman
08-29-2001, 09:47 PM
You can't manually adjust an autonumber this way. To "reset" the autonumber so that it starts counting where you want it to, you can run an append query that appends a dummy row with the value 10000 in the autonumber column. You'll also need to supply valid values for any required fields. Once this row has been added, the next autonumber value will be 10001. After that record is inserted, just delete the dummy record and you're all set.

A more detailed procedure is available from help.