I seem to be having a timing issue with my code. I open another database, read through the field list of a query (name supplied) and write each field in the query to a local table. Then I close the database (dbs.close).
Next I create a query based on this local table which a form uses to show the field names. Often the form tries to open but the query doesn't yet exist, and sometimes the other database is still open when the code is already here.
It seems to be a timing issue, I don't know very much about this and wondered if anyone could help with knowing how to tell when the first part is complete before continuing with the second.