DeleteObject not working. (1 Viewer)

Extra_Cover

Registered User.
Local time
Today, 13:30
Joined
Oct 21, 2008
Messages
71
Has anyone else come across this problem in MS Access 2000?

I have an application that updates from an ODBC source overnight using a macro that is run from Scheduled Tasks. There are several tables that are first deleted using DeleteObject and then re-impoted using TransferDatabase. However the DeleteObject for the last table does not delete the tables. The TransferDatabase action then reimports the table but the suffix 1 is added. ??
 

WayneRyan

AWF VIP
Local time
Today, 13:30
Joined
Nov 19, 2002
Messages
7,122
Extra,

Have you recently edited the relationships for the table(s)? If you have
modified them, you might not be able to drop the table without dropping
the relationship first.

Wayne
 

Extra_Cover

Registered User.
Local time
Today, 13:30
Joined
Oct 21, 2008
Messages
71
I had not thought of that Wayne - however there are no relationships defined - so it isn't that.

The application needed some tidying up and when I added a condition at the DeleteObject line which called on the results of a function that checked the existence of the table by using TableDef it worked fine. ??

Still confused as why the DeleteObject didn't work though.
 

WayneRyan

AWF VIP
Local time
Today, 13:30
Joined
Nov 19, 2002
Messages
7,122
Extra,

If the DeleteObject didn't work, there must be a relationship set somewhere!

Tools --. Relationships ... Nothing?

Access Security maybe?

Wayne
 

Kiwiman

Registered User
Local time
Today, 13:30
Joined
Apr 27, 2008
Messages
799
Howzit

Just a quick point - sometimes the relationships hide themselves - I don't know why this is. In the relatonship window right click > Show ALL. Any hidden tables with relationships will become "visible"
 

Users who are viewing this thread

Top Bottom