troubleshooting Question

How can I use a macro to delete Microsoft Access tables with relationships?

Avatar of davewalter1
davewalter1 asked on
DatabasesMicrosoft Access
7 Comments1 Solution82 ViewsLast Modified:
I need to provide a limited view of a database to a few individuals, with only a few tables and queries. My thought was to create a new database, and import the relevant tables into it. I created a macro that runs an import specification, and it works fine.

The problem is refreshing the tables. I want to run a scheduled task for this and, as you probably know, this raises several issues. First, repeatedly running the macro creates multiple copies of the tables and queries.  And deleting the tables before re-running the import routine fails because of relationships between the tables. I don't care about losing the relationships. I want to delete everything and then import the tables again, in just one shot.

I should also say that I've been using Access for a long time, but I don't do anything extremely complicated with it. So my experience is extensive but my skill level is moderate. I use macros because they're easy to use and work for my simple tasks. I don't have much experience with VBA in Access.

Thanks for your help.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros