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
DNS Requests and TRACERT
Offer Remote Assistance XP the HelpAssistant does not log in
DROP TABLE IF EXISTS tblName
How do I compare values excluding spaces in MS Access SQL - Part 2
Want Access Report to show on top of popup form
Not receiving active alert messages in the SCOM 2007 Operations Console
c# printing lines on top of each other
Excel vba: post 24 based on prev EE post - Excel Color Palette - Scheme/Index revisited - for Sean and WarCrimes
Trouble with a Winforms .NET Framework 2.0 list box
Excel and UTF8