Hi, could someone save me from pulling my last few grey hairs out please - sure I am missing the obvious.
i am using a series of combos to filter down records, and for the most part it works fine - snippet below does for example:
' If Project Name
If Not IsNull(Me.cboProjName) Then
'Create Predicate
strWhere = strWhere & " AND " & "tblContracts.[Project Name] = '" & Me.cboProjName & "'"
End If
However for one field I need to wildcard search as there are great inconsistencies in the way they have been keyed. Using the following filter on the form gives me exaclt what i want:
(((tblContracts.[Supplier Name]) Like "*" & "IBM" & "*"))
So I tried to build this into my search string like this:
' If Supplier name
If Not IsNull(Me.cboSupplier) Then
'Create Predicate
str = Me.cboSupplier
strWhere = strWhere & " AND " & "(((tblContracts.[Supplier Name]) Like '" * " & str & " * "'))"
End If
But I get a type mismatch error, despite having tried every combination I can think of. Could someone point me the right way please?
Thanks in advance.
Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
i am using a series of combos to filter down records, and for the most part it works fine - snippet below does for example:
' If Project Name
If Not IsNull(Me.cboProjName) Then
'Create Predicate
strWhere = strWhere & " AND " & "tblContracts.[Project Name] = '" & Me.cboProjName & "'"
End If
However for one field I need to wildcard search as there are great inconsistencies in the way they have been keyed. Using the following filter on the form gives me exaclt what i want:
(((tblContracts.[Supplier Name]) Like "*" & "IBM" & "*"))
So I tried to build this into my search string like this:
' If Supplier name
If Not IsNull(Me.cboSupplier) Then
'Create Predicate
str = Me.cboSupplier
strWhere = strWhere & " AND " & "(((tblContracts.[Supplier Name]) Like '" * " & str & " * "'))"
End If
But I get a type mismatch error, despite having tried every combination I can think of. Could someone point me the right way please?
Thanks in advance.
Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....