Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use the ObjectExists( ) function 1

Status
Not open for further replies.

russeldraper

Technical User
Jul 9, 2003
10
US
Hello All,

I've got a couple of lines of code:

Dim DB As Database
If ObjectExists(acTable, "Deaths_AmtTab_Agg2") Then
DB.TableDefs.Delete "Deaths_AmtTab_Agg2"
End If

But when I run the code, it gives me the following error:

Compile Error:
Sub or Function not defined

Do I need to defined ObjectExists()? I thought that it was a predifined function.What's going wrong. I have another database, and I use the function the exact same way, but it works. I'm confused.
 
I couldn't find it in Access VBA Help Files, so I'm betting it's not a built-in function. See FAQ181-36 for more info...

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top