Hey guys, I'd really appreciate any help on this Screenshots of the form, macro, and error message at the bottom.
Using Access '07 on Windows XP with a .accdb.
What is the proper way to refer to objects in a subform's macro? Say I have subform X inside parent form Y. I have X's OnCurrent doing a requery of X's combo box C, and randomly (not consistently) I get "There is no field named "C" in the current record" errors when using form Y.
I have a form with several subforms, with each subform split into tabs. Some of the subforms have combo boxes that use queries to gets lists of data from other tabs. This works fine.
In order to keep the available options up to date as users move through the parent form's records, each subform using one of these combo boxes has an "On Current" macro that simply requeries the form's individual combo box.
Most of the time this setup seems to work fine. However, seemingly randomly, Access throws some kind of scoping macro error, claiming it can't resolve the name of the object (combo box) I'm telling it to requery. This requires a user to close and reopen Access for now, and hope for the best on the next attempt.
Parent Form:
The subforms macro, requerying the combo box:
Error message #1 that appears:
Error message #2 that appears (immediately after clicking OK on error #1):