You need to specify which Field you are looking for 'ial*' in:
 
lgntable.Open ("Select * From tbllogin Where [FieldName] Like 'ial*'")

Then it should work. I do these kind of filters all the time.
 
-Tim

________________________________

From: [email protected] on behalf of ismail.vellore
Sent: Thu 5/10/2007 4:33 AM
To: [email protected]
Subject: [Access VBA Central] Wildcard search



Hi

Can anybody help me on wildcard search in VB.06.
Database have two fields txtpwd and txtuser.

txtUser field has iali1, iali2, iali3... records
When i'm using txtuser value i could find the records but when i'm
trying to using wildcard method following error occurs.

Syntax error (missing operator) in query expression 'Like 'ial*'


On Error GoTo 12
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;Data
Source= C:\DBadodb.mdb;"
cn.Open
Set lgntable = New ADODB.Recordset
lgntable.ActiveConnection = cn
lgntable.Open ("Select * From tbllogin Where Like 'ial*'")
12:
Debug.Print Err.Description

Can anybody assist me on this

Thanks in advance.




Yahoo! Groups Links







[Non-text portions of this message have been removed]

Reply via email to