JeffSM
Feb 14th, 2000, 03:04 AM
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
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