![]() |
|
|
#1
|
|||
|
|||
|
I have a table set up that I import an Excel file to. This table has an autonumber field to keep the sequence of the rows set. Before I do an import, I delete all of the records form the import table. However, the autonumber field starts with the last number used and it is getting to be a pretty large number.
Is there a way, either in the table properties or via VBA code, to reste the autonumber to 1 or some other number. Thank you for your help. |
|
#2
|
||||
|
||||
|
You should find this link helpful.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#3
|
|||
|
|||
|
I tried the code that you provided, but it didn't seem to reset the autonumber. And as I looked at the code, it appears to only work if I want to set the counter higher. (If the highest number is 500, I can make the next one 1000). But it doesn't let me reset it back to 100 or 1.
Am I missing something? |
|
#4
|
||||
|
||||
|
With all of the records deleted, if you Compact and Repair the AutoNumber seed is set back to 1.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems with autonumber field in a form | admaldo | Forms | 0 | 02-25-2008 08:09 AM |
| AUTONUMBER | J A F F A | Database Design | 1 | 10-03-2007 08:30 AM |
| Customizing the Autonumber field | wasim_sono | Access | 1 | 09-01-2006 05:27 AM |
| duplicate autonumber | rayc | Access | 0 | 01-16-2006 06:57 AM |
do all primary keys use autonumber
|
k | Database Design | 4 | 11-22-2005 06:32 AM |