Opening a Form and Subform from another Form.

T

Trini Gal

I was wondering, is it possible to filter a form and a subform from another
form?

I have a form (frmAdd_Leak), that has a subform (frmAdd_Leak_Subform), they
are attached by txtCommunity. I have another form (frmEdit) that is attached
to the subform by txtLeakID.

When the user wants to edit existing data, they click on the Edit button,
and the frmEdit open where they enter their name and todays date. I want
when they click the okay button, that second form closes and then frmAdd_Leak
is filtered to the txtcommunity, and the frmAdd_Leak_Subform is filtered to
the txtLeakID.

Is this possible?

nfortnately, I am new to this stuff and doesn't know exactly what they
mean or how to go about doing this. Can someone help me please.

This is the code I have thus far, which filters the form, how do I edit it
to filter the subform also?

Private Sub cmdOK_Click()

With Forms("frmADD_LEAK_FORM")
.Filter = "COMMUNITY= '" & Me.COMMUNITY & "'"
.FilterOn = True
End With
DoCmd.Close acForm, Me.Name

End Sub




Thanks in advance.
 

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