Refer to another subform.

G

George R

I have two subforms on one main form. They are both controls of the same main
form. Neither is a subform of the other, and they are not linked. Nor are
they linked to the main form. This arrangement is to allow simultaneous
viewing using a continuous form for form 1 and datasheet view for form 2.
While in form 1 I would like to modify and apply a filter to form 2 and have
the new, filtered data immediately appear. I need to use the OnCurrent event
of form 1 because the form 2 filter can change based on a field value in form
1.
I suspect my problem has been in coming up with the correct syntax for
refering to the second form.
I would appreciate any suggestions.
 
A

Al Campagna

George,
When in doubt, I always use full addressing to address subform to subform...
Forms!frmMyMain!frmMySub2.Form.Filter =

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 

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