Larry Brister
asked on
MS Access 2003 load subform on Tab Click
I have a form with 4 page tabs on it.
I want to load the subforms on ONE of the tabs ONLY when the Tab itself (pgVisits) is clicked.
Any ideas?
I want to load the subforms on ONE of the tabs ONLY when the Tab itself (pgVisits) is clicked.
Any ideas?
This might be possible by placing blank subform controls on your tabs and setting the SourceObject property of those controls on the click events of your tab pages:
Me.SubformControlName.Sour ceObject = "subfrmMySubformName"
Me.SubformControlName.Sour
ASKER
Going to try both suggestions
May take me a few hours to get back to you
May take me a few hours to get back to you
I'd start with Miriam's blank subform, which will take less overhead when the form starts up then forcing the loaded one to execute it's Record Source SQL.
Then VBA code in the tab's Change event to load it up.
Then VBA code in the tab's Change event to load it up.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gonna try them all folks...will take a few hours
Got 180 end users saying their screens arent the right shade of blue. ;-)
Got 180 end users saying their screens arent the right shade of blue. ;-)
ASKER
This was the best answer for what I needed guys
Then write VBA in your tab control's Change event...
Select Case Me.the_tab_control.Value
Case 0 ' The ordinal number of the tab you're talking about, starting with 0 on the left
Me.your_subform.Form.Recor
Me.your_subform.Form.Refre
End Select
btw there will likely be a couple of different methods to pull this off.