Hi guys
i have 1 mainform and within this i have
-subform1 ----this form contains listed data
-subform2 ----this form contains listed data
subform 1 has specific data which is [dob] which is pulled from table [customers]
subform 2 also has data [dob] which is pulled from [apps]
There is a button next to each record on subform1. When clicked it needs to filter subform2 and only display records that contan the same dob. This is the code i am trying to get to work.
can someone point out where im going wrong filtering. No matter what variation i use i cant get it to filter based on the dob on subform1..
thanks in advance.
i have 1 mainform and within this i have
-subform1 ----this form contains listed data
-subform2 ----this form contains listed data
subform 1 has specific data which is [dob] which is pulled from table [customers]
subform 2 also has data [dob] which is pulled from [apps]
There is a button next to each record on subform1. When clicked it needs to filter subform2 and only display records that contan the same dob. This is the code i am trying to get to work.
Code:
Private Sub Command28_Click()
Dim f As Form
Set f = Parent!subform2.Form '
f.Filter = "[DOB]=" & Me![DOB] & "'"
f.FilterOn = True
End Sub
thanks in advance.