|
-
Feb 14th, 2000, 04:04 AM
#1
Thread Starter
Registered User
What can I do?
CASE 1 )
txtName.Text=SomeCliente"Name
Set dbRec = dbDB.OpenRecordSet( "SELECT * FROM CLIENTES WHERE UCASE$(cliName)=" & Chr(34) & UCase$(txtName.Text) & Chr(34) )
CASE 2)
txtName.Text=SomeCliente'Name
Set dbRec = dbDB.OpenRecordSet( "SELECT * FROM CLIENTES WHERE UCASE$(cliName)='" & UCase$(txtName.Text) & "'")
If I use this code in both situation I get an error "Object variable or With block variable not set (Error 91) ". But what can I do to pass the name that contains the " or '?
Please I need a solution for tomorow!
Thanks in advance.
Jefferson
-
Feb 14th, 2000, 04:26 AM
#2
Change your Openrecordset call to
Set dbRec = dbDB.OpenRecordSet("Select * From CLIENTES where cliName = '" & UCase$(txtName.Text) & "'")
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
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
|