I have a database that exports a few queries to excel with a lot of data in them. Before the queries are exported, the tables that the data comes from, have a lot of data added to them since the last export. The actual query is never opened, since the only purpose they serve is to process the data a certain way before it is exporte. The whole process is handled by VBA.
This does not seem to happen all the time. But at least some of the time, if the query is not opened before the export it does not export the updated data and instead what is exported is the data the query contained the last time it was opened. It all seems to be very inconsistent. Since this is all being handled by VBA it is no big deal to open the close the queries before the export. It is however rather inelegant.
So I have a few questions to the more experienced users:
- Am correct the the queries do not update unless opened first? Is this an access bug, or normal behavior?
- If the answer above is YES, what other ways are there to forse the query to refresh programmatically without opening/closing them first?
Thank you very much in advance.