Leftover references to long-ago-removed fields in querydefs? #674
Unanswered
jhgarrison
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm finding that in exported query definitions I'll sometimes see a reference to a field that no longer exists, left over in the set of BEGIN...END blocks near the top of the .BAS file. Example
The field
hoursUsedno longer exists in the query or in the referenced query.I think this is benign, but I'd like to find a way to make Access recompile the query and keep it up to date. I sometimes use grep over the exported source tree just to make sure I've covered all the bases when making a change, and these spurious hits can be a pain to verify.
I already tried
dbengine.Idle dbRefreshCachebut it had no effect.So I guess my question is how can I force Access to rebuild the query so that when exported it doesn't contain these old, meaningless references?
Thanks
Additional info: It seems that when a query is updated to remove or rename an output column, the .SQL file gets updated but the .BAS file doesn't get cleaned up. Can Access be made to clean up the .BAS file and sync to the actual query?
Beta Was this translation helpful? Give feedback.
All reactions