I have a Main form and 3 subforms. Each of the 3 sub forms has more sub forms. When I initially open the Main form, I do not want to load any of the 3 sub forms or their subforms. I also have 3 buttons inside the Main form. On the click of these buttons, I want to open the corresponding subforms and its subforms.
Thanks much in advance for your help
Joy
Microsoft Access
Last Comment
Joy Gomez
8/22/2022 - Mon
Gustav Brock
This is done by setting the RecordSource of the subform(s) when you click that button:
Dim f As FormSet f = <the subform in question>f.RecordSource = Name of query or an SQL sentence.
Are you saying that when I load the main form, I should by default make the subforms visibility=false... then on button click make the subform visibility=true? Does that have the same effect as loading a form? The reason I am doing this, is because I have so many subforms, that it takes forever to load the main form, and I am trying to reduce this time.
This is done by setting the RecordSource of the subform(s) when you click that button:
Open in new window
When done, the subform will update at once.