Determine what tables are in a database window with Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my application the user enters a table name in a text box on a form. I
want to use code to verify that the table entered is actually in the database
window. How can I do this?
 
Function TableExists(NameOfTable As String) As Boolean
' Returns True if table exists, False otherwise
On Error Resume Next

TableExists = (CurrentDb.TableDefs(NameOfTable).Name = NameOfTable)

End Function
 
Back
Top