Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Importing/Replacing data from external databaseHelpful Member! 

drichter12 (TechnicalUser) (OP)
15 Feb 11 9:21
I have a database in Access 07 that I need to be portable/self-contained, however, it pulls a major peice of data from a database on our internal network as well as other data from linked Excel spreadsheets. My question is, is there an easy way to set my database up so that I can pull the data from the database into a table as needed (the data just needs to be refreshed about once a week or so) replacing the old data with the new? I would also like to do the same with the linked Excel spreadsheets. This would give me the ability to use my database as a stand-alone unit without having to be connected to the internal network or constantly copying updated spreadsheets.

Thanks,

Dale

Helpful Member!  dhookom (Programmer)
15 Feb 11 10:32
Apparently you want to keep local copies of linked tables/spreadsheets. This can be done by using append, delete, and/or make table queries.

The issue you may have is your forms, reports, and queries all expect tables with specific names. Your "local" copy have different names. You will need to contend with this issue by using code or queries or whatever. Let us know if you need a strategy recommendation for this.

Duane
Hook'D on Access
MS Access MVP

drichter12 (TechnicalUser) (OP)
15 Feb 11 12:44
The most important peice of data is a site "Master" database on a sequal server. I just set up an ODBC Data link to it on my pc so the table and fields in my access database have the same names as the original. The spreadsheet fields all match in the linked tables as well. I can re-build queries and relationships if I have to in order to make things work better if need be. My biggest stumbling block will just be setting things up so I can run some sort of "Refresh" macro to update all the tables in my database with the external information. I have no problem wiping the data from the tables and just importing the most recent data from the external sources back into them. There are less than 10,000 site records so it should not take long to import data from scratch once a week.

 

Dale

dhookom (Programmer)
15 Feb 11 13:20
You can write code that runs your delete and append queries like:

CODE

   Dim strQueryName as String
   strQueryName = "qdelTable1"
   Currentdb.Execute strQueryName, dbFailOnError
   strQueryName = "qappTable1"
   Currentdb.Execute strQueryName, dbFailOnError
   strQueryName = "qdelTable2"
   Currentdb.Execute strQueryName, dbFailOnError
   strQueryName = "qappTable2"
   Currentdb.Execute strQueryName, dbFailOnError
   Msgbox "Finished"
You could create a button on a form to run this code.

Duane
Hook'D on Access
MS Access MVP

drichter12 (TechnicalUser) (OP)
15 Feb 11 17:03
It appears all is working as advertised! Thanks Duane!

Dale

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close