Hi Guys
Can someone tell me what is the way for finding out whether a table exists in the Microsoft Access database?
Thanks
Ashish Pandey
Total Post:128
Points:898
Post:604
Points:4228Re: What is the way for finding out whether a table exists in the Microsoft Access database?
hi ashish,
given query solve your problem....
Dim db As Database
Dim i As Integer
Set db = DBEngine.Workspaces(0).Databases(0)
fExistTable = False
db.TableDefs.Refresh
For i = 0 To db.TableDefs.Count - 1
If strTableName = db.TableDefs(i).Name Then
'Table Exists
fExistTable = True
Exit For
End If
Next i