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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Tables and Queries

Status
Not open for further replies.

carefully

Programmer
Mar 14, 2000
8
CA
I have a database1 with tables tblA, tblB, tblC etc
a subset of which, database2, with tblA, tblC (same data)etc
I wish to maintain to upload to the internet.

I want to automate a procedure so that I can import tblA
and tblC from database1 when required, overwriting the existing tables in database2 i.e leaving them with the same names rather than the tblA1 or tblC1 that have so far resulted either via importing or linking.

There are a fair number of queries and tables involved
so I dont want to import, delete the old tables and
then rename the new tables to the original names

Any help would be appreciated
[sig][/sig]
 
If this process is one that works off of a specific time tracked in db2, then you can create a form that will test for the time of day(run it hidden or minimized), when the time is correct, it can set the database to exclusive, perform some DoCmd.DeleteObject statements to get rid of the existing tables and queries, and then the importing of the new ones and setting back to shared.

If this is a process you want to be able to start from db1, then there is code out there that will run a macro or open a form in a different mdb. It opens a second instance of Access, to do it. Then you could have that macro or form do the setting to exclusive, deleting and importing, then set back to shared and quit the second instance of Access.

PaulF [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top