I have a combo box on a form that I want to filter a subform (SubSearchMaster_frm).
I am receiving:
Runtime error 3464: data type mismatch in expression.
The code is below:
Private Sub CboNIIN_AfterUpdate()
Me.SubSearchMaster_frm.Form.Filter = "[NIIN] = " & Me.CboNIIN
Me.SubSearchMaster_frm.Form.FilterOn = True
End Sub
The subform is a query.
I have also tried:
Private Sub CboNIIN_AfterUpdate()
Dim sql As String
sql = "Select * from SubSearchMaster_frm where ([NIIN] = " & Me.CboNIIN & ") From subsearchmaster_frm"
Me.SubSearchMaster_frm.Form.RecordSource = sql
Me.SubSearchMaster_frm.Form.Requery
End Sub
But I'm getting an error on that too.
NIINfield? And does the bound column of your combobox correspond to this field? - Lee Mac