Openform criteria help needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box which the user inputs some text. Then click on the search
button, the on_click event in part is....

DoCmd.Openform stDocName, , , ("CustomerID &" Like "*" & Me.SearchText & "*")

I read somewhere that the criteria can be any valid SQL type statement. I
don't get any matches using the above and no error messages.

This is in Access 97.

Thanks.
 
Paul said:
I have a text box which the user inputs some text. Then click on the search
button, the on_click event in part is....

DoCmd.Openform stDocName, , , ("CustomerID &" Like "*" & Me.SearchText & "*")

I read somewhere that the criteria can be any valid SQL type statement. I
don't get any matches using the above and no error messages.

Your quotes are out of whack. Try this:
.. . ., "CustomerID Like ""*" & Me.SearchText & "*"""
 
Back
Top