vbnetcoder
asked on
the database could not lock the "tablename" because it is in use by another person or process
This error started coming up when referring to the table in my code. I can open up the table without any issues otherwise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it is throwing and error on that line now
ASKER
if i get rid of this code it works:
'strSQL = "ALTER TABLE " & strTableName & " ALTER COLUMN id COUNTER (1, 1);"
'CurrentDb.Execute strSQL
but i need it
'strSQL = "ALTER TABLE " & strTableName & " ALTER COLUMN id COUNTER (1, 1);"
'CurrentDb.Execute strSQL
but i need it
ASKER
It turned out that somehow my form was referencing the table as a record source. not sure how that happened. I took it away and it was fixed
make sure that you close all recordset you open after you use them.
test your code again.