Page 1 of 1
[Solved] Reset Autofield
Posted: Thu Oct 23, 2008 6:04 pm
by Wimba
Created real simple database with one form. Used Autofield as key - did some testing, now I want to implement but Autofield is starting at 9 (tested 8 times). How do I start at 1 now that I am ready to implement?
Re: Reset Autofield
Posted: Thu Oct 23, 2008 7:30 pm
by TheGurkha
Hi and welcome to the forums.
Well, you don't really need to. It'll start at 9 and do just as well as if it started at 1.
Or are you using the field as some sort of visible thing in the form as well?
Re: Reset Autofield
Posted: Thu Oct 23, 2008 8:01 pm
by QuazzieEvil
you can restart it with the following SQL command
Code: Select all
ALTER TABLE <table name> ALTER COLUMN <column name> RESTART WITH <restart value>
enter that command in the SQL dialog (Tools | SQL.. )
Re: Reset Autofield
Posted: Thu Oct 23, 2008 10:50 pm
by Wimba
Thank you both - I guess you have a point about what difference does it make - guess I'm just being anal - on the other hand good to have the code if I can't get over it!
Thanks again
Re: Reset Autofield
Posted: Thu Oct 23, 2008 11:32 pm
by TheGurkha
Ha ha - we're all anal about something.
If this has answered your question please go to your first post and use the edit button and add [Solved] to the start of your title. You can also select the green 'tick' icon.