Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update subform2 from subform1

Status
Not open for further replies.
Mar 8, 2009
6
US
Hi-
I have a main form that has a control for selecting a customer. Once a customer is selected subform1 becomes visible and filters to show that customers orders.
Now, on subform1, on the OnCurrent event I want subform2 to become visible in mainform and show the details for that order.
I have the main form and subform1 working fine. But I'm having trouble with how to refer to subform2 from subform1's OnCurrent event.
Both subforms are children of mainform. That is, subform2 is not a child of subform1.
This is the code that I have in the OnCurrent event in subform1, but access says it can't find the field subform2.

Code:
If Not Forms!frm_Main!subfrm2.Form!Visible Then
    Forms!frm_Main!subfrm2.Form!Visible = True
End If

Once I get the visible event to fire I should then be able to figure out the filter.

Thanks.
 
pfff.
Never mind. I removed subform2, then put it back without resetting the name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top