How to change the record source at runtime?

C

cabong

Basically I have this subform called frmFundsSub on a form called
frmFundsMain.

I'm trying to change the record source for my subform when the user
click an option button on the main form, thus refreshing the subform
with a different recordset.


I have difficulty accessing the record source property of the subform
by code from the main form. Can someone show me the proper syntax?

Thanx a bunch
 
H

Howhiareu

me.[SUBFORM OBJECT FRAME NAME].form.recordsource="NEWRECORDSOURCE"
me.[SUBFORM OBJECT FRAME NAME].form.requery
 

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