look if table exist using wildcards

Toine

New member
Local time
Today, 16:28
Joined
Sep 24, 2007
Messages
7
Is it possible to use wildcards to see if a table exists?
For instance I want to delete alle temp tables that are in a database.
The tables do not have a fixed name, it is based of the form and the recordnumber that someone used.

is it possible to check if a table exists that matches 'temp*' as name?
 
Code:
select name from msysobjects where type=6 and name like 'temp*"
enjoy!
 
Or the 'official' way
For Each tdf In CurrentDb.TableDefs
If (Left(tdf.Name)="temp") Then
' this is one
End If
Next
 

Users who are viewing this thread

Back
Top Bottom