Microsoft
Software
Hardware
Network
Question : Use VBA Code to check if a table exists.
How can I determine if a table exists in the current database,
1. using the least number of lines of VBA code
2. taking the least CPU time to execute
3. both.
Answer : Use VBA Code to check if a table exists.
Call this function:
Public Function mCheckTable() As Variant
On Error Resume Next
DoCmd.OpenTable "TableName"
If Error = 7874 Then 'table does not exist
Err.Clear
Exit Function
Else
err.clear
End If
End Function
Random Solutions
SQL awkward behaviour (urgent)
insert missing deleted rows in a table from a backup
How to type a character string using a shortcut key in VBA.
Function Key to go to the bottom of and edit field
Outlook emails stay marked as Unread
Exchange Server 2003 SMTP Problems
Cannot create Web app for Shared Service Provider setup in Sharepoint 2007
MSI Compatibility Issue on Windows Server 2008
Conditionally filter numbers based on digits beyond decimal point
DoCmd.RunMacro Problem/Question