Multiple subforms based on same form?

buratti

Registered User.
Local time
Today, 16:12
Joined
Jul 8, 2009
Messages
234
I have a home screen/summary form that I want to display order detail option groups. Group 1 have display all new orders, group 2 display all active orders, group 3 display all closed orders, etc. Instead of having 4 different forms based on 4 different queries for each subform in the option groups (which all the queries being exactly the same except one number difference in the criteria of the status ID), is there any way to base them all on 1 query/subform, and with the click of each option group, have it run the specific query or just filter for the data that should show for that option group?
Thanks for any suggestions!
 
One way would be to change the recordsource of the subform in the after update event of the option group:

Me.SubformName.Form.RecordSource = "SELECT Blah FROM TableName WHERE StatusID = 1"
 
Oops!! I meant to say tab groups before, where each tab I guess would have the same subform, but different filter/query.
 
I think the other idea is better. Having multiple subforms would slow down the form anyway. With tabs, the user would only be seeing one at a time anyway, so I would just have one and switch the source.
 

Users who are viewing this thread

Back
Top Bottom