Importing tables using VB

stepone

Registered User.
Local time
Today, 18:43
Joined
Mar 2, 2004
Messages
97
Hello,

I am looking for some help on writing VBA to import tables from one database to another.

The database has two version - the Master copy will reside in an office - but some users will be out and about with a User copy, interviewing patients on laptops. At the end of the day (or week), they will copy this User db back on to the pc where the Master copy resides. I then want to make it easy for the Master users to import this data, so I would like to write some VBA which will ;

- allow them to browse to the User copy of the database
- import the necessary tables
- run an append query to import the data

I can do the append part, but I would like some help on the import part, and if anyone has done a similar setup and has any advice, that would be great,

Thanks a lot,
Stepone.
 
Just use the following code and it will open the browse dialog and you can select the database as if you used the menus.

Enter on the onclick event of a cmd button or wherever you want to trigger it.
Code:
Docmd.Runcommand acCmdImport


Andy
 

Users who are viewing this thread

Back
Top Bottom