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
How to restrict access in asp.net so that window prompt comes up
Epson Twain with Vista Home Premium
SSIS Script task Excel object reference release
Need help finding Office 2007 Product Key in Registry
transferring terminal services licenses to a new server
Connect to a Crosstab query in Access from Excel
Powerpoint clip art gone!
How to change the language used for menus and dialog boxes
Count Distinct Records - Query
Urgent System.UnauthorizedAccessE<wbr />xception