On Click - Change Record Source

M

Mike C

I would like to change the record source of my subform
when I check a box on my form. I know how to do it with a
list box but I can't figure out how to do it with a form.
Any ideas or suggestions would be greatly appreciated.

Here is list box example: Me.lstFinal.RowSource
= "qry_Final"
 
S

Steve Conway

Hi Mike,

Me.sfrmControlName.Form.RecordSource = "SomeqryName"

where sfrmControlName is the name of the subForm control on your main form.

HTH
Steve C
 
N

Neil

Mike,

Me.SubFormControlName.Form.RecordSource = "qry_Final"

You may need to requery the subform after you change the SourceObject to
update the changes.

HTH,

Neil.
 

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

Top