If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro Fails Due to Table Locked
I have a standalone form with a page that contains a subform linked to a
query. In order to update the subform data, I created a macro to run several queries that will ultimately update the query the subform is linked to. In my macro, I close the main form, run all of the queries and then re-open the main form with a GoToControl to get it to go right back to the page where the subform resides. I continue to get an error with my macro that states it can't run my queries because the table is already in use. When I manually close the main form and run the macro, it works fine. Any thoughts? |
#2
|
|||
|
|||
Macro Fails Due to Table Locked
The form is not closing fast enough for your queries to be able to gain
access to the table. This likely is a timing issue. Any particular reason you cannot update the data directly in the subform without having to run the external queries? Otherwise, you'll need to run a macro to close your current form, open another form, and then run a macro from that form that will do the updates (that should ensure that the first form is fully closed). -- Ken Snell MS ACCESS MVP "LLFK" wrote in message ... I have a standalone form with a page that contains a subform linked to a query. In order to update the subform data, I created a macro to run several queries that will ultimately update the query the subform is linked to. In my macro, I close the main form, run all of the queries and then re-open the main form with a GoToControl to get it to go right back to the page where the subform resides. I continue to get an error with my macro that states it can't run my queries because the table is already in use. When I manually close the main form and run the macro, it works fine. Any thoughts? |
Thread Tools | |
Display Modes | |
|
|