I have a form with two subforms. I change some properties of subforms with data from subform1, using subform1's OnCurrent event . So everytime the user changes rows in subform1, it will do this:
When I open the form, this causes an error message: Run-time error "2455": You entered an expression that has an invalid reference to the property Form/Report.Code:Forms("Song Collection Entry").subform2.Form.Member.DefaultValue = Me.[SongID].Value
However, after I click "End" on the error message, it works just fine.
My guess is this is an issue with subform2 not being loaded the first time it's called.
Right now I'm using a very cludgy workaround; I declare a global boolean, so the first time OnCurrent is called I check it, it's false, I skip the code and set it to true, and there are no errors.
But I really hate to do something that sloppy. Is there a better workaround? A way to check whether Forms("Song Collection Entry").subform2.Form.Member exists or is initialized or whatever? Is there a way to check whether the subform is loaded? Or would I have to do something with error checking?