Hi all,
I have a database that generates a unique ID in a form (frmDataEntryGreens) by running a maketable query (to create tblTempTable) and then running some other queries on that table to generate the ID. This all works fine. however, when I need to re-generate a new ID, I need to close those queries (which I do using macros on the OnClick property of the Close Form button).
Then I need to delete tblTempTable ready for the next ID to be generated; however, if I try to do this using DoCmd.DeleteObject I receive an error telling me that the table could not be locked because it's in use by another person or process. This is not the case; all tables and queries are close and I'm the only person using the database.
If I create a function and call that function from a macro, I get the error "The object doesn't contain the automation object..."
This is driving me up the wall - it's the last hurdle to get over in a massive project and it should be so simple!
Thanks!
Adam