Hattrick16
Technical User
My database is structured in a way I can run all the queries that begin with "IP - 0" however can I extend the wildcarding so I run all the queries that begins with "IP - 0" and end with say " -X". There are a lot of queries in the DB and the staff marks each applicable query by placing a " -X" at the end of the name" What would the Syntax be if this is possible. My current code is below.
Dim qdf As QueryDef
Dim DB As Database
Set DB = CurrentDb
DoCmd.SetWarnings False
For Each qdf In DB.QueryDefs
If qdf.Name Like "IP - 0*" Then
DoCmd.OpenQuery qdf.Name
End If
Next
DoCmd.SetWarnings True
End Sub