Hi,
I have a form that users use to input information into a table. I created a field in my table called id this is the primary key. I want this id to start from 10,000 and keep incrementing everytime a new record gets stored.
I didn't want to mess around with auto number.
This is how I am thinking I could do this...
On the form onLoad event I initialize this global variable lastRecId to be 10,000 if there are no records in my table.
If the table is not empty obtain the unique id from the last record in the table and set lastRecId to this value + 1. Everytime you do an insert into the table increment lastRecID by one.
Would this work ?
Sync123
I have a form that users use to input information into a table. I created a field in my table called id this is the primary key. I want this id to start from 10,000 and keep incrementing everytime a new record gets stored.
I didn't want to mess around with auto number.
This is how I am thinking I could do this...
On the form onLoad event I initialize this global variable lastRecId to be 10,000 if there are no records in my table.
If the table is not empty obtain the unique id from the last record in the table and set lastRecId to this value + 1. Everytime you do an insert into the table increment lastRecID by one.
Would this work ?
Sync123