Swap queries to display diferent filtered records in subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use predefined queries as subform data and swap the assigned
query names for the subform data, This swap of queries will be based on
option group radio buttons to filter subform data using the correct query. I
tried other ways that did not work and I think this may be a viable way to
accomplish this task. So my question is how can I use various queries to
filter subform data that cannot be filtered based on main form data.
 
You can use the After Update event of your option group radio buttons with
Select Case statements like:

Dim strRecordSource as String
Select Case Me.OptGroup
Case 1
strRecordSource = "qselOne"
Case 2
strRecordSource = "qselTwo"
Case 3
strRecordSource = "qselThree"
End Select
Me.sfrmCntrl.Form.RecordSource = strRecordSource
 
Duane,

Great suggestion it works well!!
--
Thanks,

Dennis


Duane Hookom said:
You can use the After Update event of your option group radio buttons with
Select Case statements like:

Dim strRecordSource as String
Select Case Me.OptGroup
Case 1
strRecordSource = "qselOne"
Case 2
strRecordSource = "qselTwo"
Case 3
strRecordSource = "qselThree"
End Select
Me.sfrmCntrl.Form.RecordSource = strRecordSource
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top