|
-
Aug 24th, 2000, 08:07 PM
#1
Thread Starter
Junior Member
I've got a question concerning querying an Access DB. When I run the following code, it works fine:
Dim strSQL As String
strSQL = "SELECT * FROM Customers WHERE "
'Code to handle empty text box
strSQL = strSQL & "UniqueID = " & txtUnique.Text
That works. However, when I set the string to search a text value (where the ID is a numeric value):
strSQL = strSQL & "LastName = " & txtLast.Text
I get a data type mismatch. It puts the debugging program to the connection string that uses strSQL as the adCmdText.
Any ideas? Is it something I am not doing with quotation marks?
Thank you.
FLL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|