russeldraper
Technical User
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'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.