Hi All,
I need to filter a subform based on the values on the mainform.
Criteria are Multiple. The idea is to show the user the records that are already existing in the table.
First two criteria works, stuck with the third one
I.Criteria – Creative(text type)
Private Sub Creative_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
"Creative ='" & Creative & "'"
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
II Criteria – Creative(text type) And Act_ID(numeric type)
Private Sub Act_ID_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
"Creative ='" & Creative & "' And Act_ID = " & Act_ID
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
III Criteria – Creative(text type) And Act_ID(numeric type) And Mth_ID(numeric type)
rivate Sub Mth_ID_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
? third criteria
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
Also, how to split the code into two lines
"Creative ='" & Creative & "' And Act_ID = " & Act_ID
when broken into:
"Creative ='" & Creative & "' _
And Act_ID = " & Act_ID
is automatically saved as:
"Creative ='" & Creative & "'" _
And Act_ID = " & Act_ID " and this generates an error on execution.
Any Help on this!!
Thanks & Regards,
Tanya
I need to filter a subform based on the values on the mainform.
Criteria are Multiple. The idea is to show the user the records that are already existing in the table.
First two criteria works, stuck with the third one
I.Criteria – Creative(text type)
Private Sub Creative_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
"Creative ='" & Creative & "'"
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
II Criteria – Creative(text type) And Act_ID(numeric type)
Private Sub Act_ID_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
"Creative ='" & Creative & "' And Act_ID = " & Act_ID
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
III Criteria – Creative(text type) And Act_ID(numeric type) And Mth_ID(numeric type)
rivate Sub Mth_ID_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
? third criteria
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub
Also, how to split the code into two lines
"Creative ='" & Creative & "' And Act_ID = " & Act_ID
when broken into:
"Creative ='" & Creative & "' _
And Act_ID = " & Act_ID
is automatically saved as:
"Creative ='" & Creative & "'" _
And Act_ID = " & Act_ID " and this generates an error on execution.
Any Help on this!!
Thanks & Regards,
Tanya