F
Fusen
Guest
Im trying to create a form that will search the records in a table according to multiple criterias. Ive been trying to do it this way:
If [txtBoxNo] <> "0" Then
LINKCRITERIA = "[BOXNO] = Forms![frmSelect]![txtBoxNo]"
End If
If [txtName] <> "0" Then
LINKCRITERIA = "[Name] = forms![frmSelect]![txtName]"
End If
If [txtDateIn] <> "0" Then
LINKCRITERIA = "[DateIn] = forms![frmSelect]![txtDateIn]"
End If
But it seems to bring in all records that fit any of the criterias. I'm also trying to create a date range search as well as "Like" Name search. Any help would be appreciated. Thanks!
If [txtBoxNo] <> "0" Then
LINKCRITERIA = "[BOXNO] = Forms![frmSelect]![txtBoxNo]"
End If
If [txtName] <> "0" Then
LINKCRITERIA = "[Name] = forms![frmSelect]![txtName]"
End If
If [txtDateIn] <> "0" Then
LINKCRITERIA = "[DateIn] = forms![frmSelect]![txtDateIn]"
End If
But it seems to bring in all records that fit any of the criterias. I'm also trying to create a date range search as well as "Like" Name search. Any help would be appreciated. Thanks!