PDA

Click to See Complete Forum and Search --> : HELP URGENT PLZ!!!!!!!


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

MartinLiss
Feb 14th, 2000, 03:26 AM
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!"