Posted on 2004-08-25
I use MS Access 2000.
I have an unbound main form and then bound subforms.
How do you programmatically change the Recordsource of a subform?
For Example: When the user is doing data entry and the main form opens, the form (and subforms) auto populate with a new entry. This part works great, but with this I am setting the subform's Recordsource the easy way - using the Properties GUI of the subform.
I want to remove this property in the Properties GUI and set the subform's Recordsource in VB.
I'm thinking that either in the "On Open" or "On Current" Event I need to have code something like:
But that didn't work.