have a combo box on a form that I want to filter a subform (SubSearchMaster_frm). I getting a runtime error 3464: data type mismatch in expression. the code is below.
I have also tried:
But I'm getting an error on that too.
Code:
Private Sub CboNIIN_AfterUpdate()
Me.SubSearchMaster_frm.Form.Filter = "[NIIN] = " & Me.CboNIIN
Me.SubSearchMaster_frm.Form.FilterOn = True
End Sub
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.