(Access 2003)
The code:
1-open another database
2-for a specified query (name supplied)
for each fld in qfd.fields
write a record to a local table
3-close database
4-create query based on local table
5-RefreshDatabaseWindow
6-open form with query as record source
The code works, the table is populated and the form opens with data. However, sometimes it happens and sometimes it doesn't. I put a loop/counter in to refresh and open form until error=0 - I went as high as 2000 but again, sometimes this is successful and sometimes it isn't. The error is: 2580 The record source specified on the form does not exist.
Each time I reach the counter max I then get the error "You do not have exclusive access to the database at this time" when I try to make a change.
It seems as if it is getting to step 4 before 1-3 are finished.
Any pointers or assistance on this will be GREATLY appreciated.
The code:
1-open another database
2-for a specified query (name supplied)
for each fld in qfd.fields
write a record to a local table
3-close database
4-create query based on local table
5-RefreshDatabaseWindow
6-open form with query as record source
The code works, the table is populated and the form opens with data. However, sometimes it happens and sometimes it doesn't. I put a loop/counter in to refresh and open form until error=0 - I went as high as 2000 but again, sometimes this is successful and sometimes it isn't. The error is: 2580 The record source specified on the form does not exist.
Each time I reach the counter max I then get the error "You do not have exclusive access to the database at this time" when I try to make a change.
It seems as if it is getting to step 4 before 1-3 are finished.
Any pointers or assistance on this will be GREATLY appreciated.