Hi
I am using the code below to supply the record source to a form. Unfortuantly the sql is not working! Can anyone help!
Dim strNewRecord As String
Dim strSupplier As String
If IsNull(Me.cboSupplier.Value) Then
strSupplier = " Like '*' "
Else
strSupplier = "='" & Me.cboSupplier.Value & "' "
End If
strNewRecord = "SELECT * FROM qryProducts " _
& " WHERE (((qryProducts.Supplier) Like '" * " & strSupplier & " * "'))"
Me.RecordSource = strNewRecord
I am using the code below to supply the record source to a form. Unfortuantly the sql is not working! Can anyone help!
Dim strNewRecord As String
Dim strSupplier As String
If IsNull(Me.cboSupplier.Value) Then
strSupplier = " Like '*' "
Else
strSupplier = "='" & Me.cboSupplier.Value & "' "
End If
strNewRecord = "SELECT * FROM qryProducts " _
& " WHERE (((qryProducts.Supplier) Like '" * " & strSupplier & " * "'))"
Me.RecordSource = strNewRecord