Automatically Delete and Import Table

L

Lamar

I want import a table from another database. Can I do this just using VB
coding?

Everytime a user opens the database, I want to delete a table named
"Completed Requests" and then import a table named "Completed Requests"
another database.

I want to do this over and over again. I do not want Warning signs to appear.

Is this possible? Thanks for any help.
 
J

Jeff Boyce

Lamar

Perhaps you don't need to delete and reload...

If you created a query that deletes all the rows but left the structure
intact, you'd have an (empty) table after running it.

If you created a second query that looks to your source (you didn't say
where this was coming from) and appends records from it into the (now) empty
table, you would have effectively re-loaded it.

If you use a link to the data source, rather than importing it, you can have
that data source file replaced (with the same name, new data), and only have
to run your two queries to update.

You can create a macro to do this.

By the way, if you only need to see the data, could you simply link to it
instead of importing it into Access?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
L

Lamar

I like your idea about appending but I am importing the table from another
database on the network. Maybe I will try linking the data.
 
Top