[AccessD] Does table exist?

t tom ttom at accessyourdata.com
Wed Mar 19 14:00:00 CST 2003


Hi 

Try

Public Function CheckTableExist(strTableName As String) As Boolean
Dim strCriteria As String

strCriteria = "name = '" & strTableName & "'"
If Nz(DCount("[ID]", "MSysObjects", strCriteria), 0) > 0 Then
    CheckTableExist = True
Else
    CheckTableExist = False
End If
 
End Function

HTH
Tomt
  ----- Original Message ----- 
  From: Mark Boyd 
  To: AccessD at databaseadvisors.com 
  Sent: Wednesday, March 19, 2003 10:48 AM
  Subject: [AccessD] Does table exist?


  Is there code to find out if an Access table exists in the database?



  TIA,

  Mark Boyd

  Sr. Systems Analyst

  McBee Associates, Inc.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030319/112d9a02/attachment-0001.html>


More information about the AccessD mailing list