Hello,
Can someone tell me what I'm doing wrong, or please help me.
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.
Please help.
Thanks in advance.
Can someone tell me what I'm doing wrong, or please help me.
Code:
Private Sub cmdOK_Click()
With Forms("frmADD_LEAK_FORM")
[highlight].Filter = "COMMUNITY= '" & Me.COMMUNITY & "'" And Forms.frmADD_LEAK_FORM.frmADD_LEAK_SUBFORM.Form.LEAKID = Me.LEAKID[/highlight]
.FilterOn = True
End With
DoCmd.Close acForm, Me.Name
End Sub
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.
Please help.
Thanks in advance.