Im trying to use the Like operator to my sql but can't figure out why giving
me zero result , but if I paste the sql string on the query it gives me the
exact result? What I've missed here?

TIA
George

==>
    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim strSQL As String

    Set cn = CurrentProject.Connection
    Set rs = New ADODB.Recordset
    strSQL = "SELECT * FROM CntTblContacts WHERE CntFName Like '*ab*'"
    Debug.Print strSQL
    rs.Open strSQL, cn, adOpenStatic

    MsgBox rs.RecordCount

    rs.Close
    cn.Close
    Set rs = Nothing
    Set cn = Nothing



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



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ms_access/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to