The code above works fine. I'm trying to be more flexible and give the user a text box to provide the own name to search. So I have a textbox called txtCustname.
I modify my code to the following:
sql1 = "select * from Receipts where Custname =txtCustname.txt "
rs.CursorLocation = adUseClient
rs.CursorType = adOpenForwardOnly
rs.LockType = adLockReadOnly
rs.Open sql1, cn
I get the error msg "No value given for one or more required parameters" with rs.Open sql1,cn highlighted.
Where am I getting lost? Thanks for all your replies.