I use these lines to delete the records from a table and reset ID automumbering to start fra 1 again:
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM [INFOs midlertidig]"
DoCmd.RunSQL "ALTER TABLE [INFOs midlertidig] ALTER COLUMN [Id] COUNTER(1,1);"
DoCmd.SetWarnings True
But the "Alter table" fails because some other use the table !
How can I cure that problem ?