I use QueryDefs to retreive an address table from backend. To avoid time delays I reconstruct a table with the same contents in frontend and then change the content of a linked table when there is a need to refresh addresses in my frontend. This works fine.
However, I would like to change the vissible columns in my remote query to change the linked table in frontend. In principle this should work if I could temporarely resolve my frontend query links to the old table to allow it to be dropped. I use following code to finish the current form and the associated query table:
DoCmd.Close acForm, "wisdselect", acSaveYes 'Close wisdselect and reopen - to update the list
CurrentDb.Close
DoCmd.RunMacro "Dropactrep"
The fashinating thing is that the macro refuse to drop the tables when the program pointer is active on this program row. When I manually quit the form the macro executes just as I want. My conclusion is that some mysterious references remains after I closed the form and also the current.db.
Anybody who have an idea?
However, I would like to change the vissible columns in my remote query to change the linked table in frontend. In principle this should work if I could temporarely resolve my frontend query links to the old table to allow it to be dropped. I use following code to finish the current form and the associated query table:
DoCmd.Close acForm, "wisdselect", acSaveYes 'Close wisdselect and reopen - to update the list
CurrentDb.Close
DoCmd.RunMacro "Dropactrep"
The fashinating thing is that the macro refuse to drop the tables when the program pointer is active on this program row. When I manually quit the form the macro executes just as I want. My conclusion is that some mysterious references remains after I closed the form and also the current.db.
Anybody who have an idea?