Docmd.RunSQL with Like and Wild Card

J

Jim

I'm having trouble with the where clause in the following statement. It
works when I created it using the Query builder but not when I use it in
runsql.

varSQL = "SELECT msysobjects.Name FROM msysobjects WHERE
(((msysobjects.Name) Like 'srtc_*') AND ((msysobjects.Type)=1))"

Set rstTables = New ADODB.Recordset
rstTables.CursorLocation = adUseClient
rstTables.Open varSQL, CurrentProject.Connection, adOpenStatic,
adLockOptimistic

Thanks for your help,

Jim
 
J

Jim

Duane,

The problem was there was no records in the query results. The % fixed the
problem... Thanks for the help...

Jim
 
Top