PC Review


Reply
Thread Tools Rate Thread

Copy over current Database

 
 
Katrina
Guest
Posts: n/a
 
      16th Apr 2004
We have a database that will probably end up on people's
hard drives. The database will not need to be updated
that often, maybe once every three months.

I was asked to make a button in the database that would
allow the user to easily update his/her hard drive copy
(UserDB).

Basically, they would like to push a button to copy one
folder containing the database and the information within
(the master copy) to the current storage location.

I can figure out all the logistics except how to close
UserDB so that I can copy over it. I set up another
database (Updater.mdb) to run the code of copying over the
folder, and I can open it from UserDB, but how do I close
UserDB before running the code in Updater.mdb. Right now
Updater is set up to run the copying code automatically...

Thanks for your help
 
Reply With Quote
 
 
 
 
Doug Bell
Guest
Posts: n/a
 
      17th Apr 2004
Katrina,
To achieve this you need to have another Access Db (or VB executible) on the
server eg DBUpdate.mdb

When the user clicks the Update button it uses the Shell cmd to launch
DBUpdade, passing to it as a command line argument a string that contains
the path and file name of the Users DB (to be updated). The button then
closes the User's DB.

DBUpdate tries to rename the User's DB and if it fails, it waits and tries
again (however many times, say 3 times with 5 second delays), once it
renames the user's DB, it copies the updated DB to the User.

You could also use replication to achieve this and you could also deploy
copies of DBUpdate to each User PC aleviating the need to find the UNC to
pass to it.

Doug

"Katrina" <(E-Mail Removed)> wrote in message
news:006901c423ee$de865270$(E-Mail Removed)...
> We have a database that will probably end up on people's
> hard drives. The database will not need to be updated
> that often, maybe once every three months.
>
> I was asked to make a button in the database that would
> allow the user to easily update his/her hard drive copy
> (UserDB).
>
> Basically, they would like to push a button to copy one
> folder containing the database and the information within
> (the master copy) to the current storage location.
>
> I can figure out all the logistics except how to close
> UserDB so that I can copy over it. I set up another
> database (Updater.mdb) to run the code of copying over the
> folder, and I can open it from UserDB, but how do I close
> UserDB before running the code in Updater.mdb. Right now
> Updater is set up to run the copying code automatically...
>
> Thanks for your help



 
Reply With Quote
 
Katrina
Guest
Posts: n/a
 
      19th Apr 2004
This is exactly what I want to do. However, the shell
function is not letting me call out a .mdb file. Can you
please give me an example of how I would call out a .mdb
file with the shell command?

Also, please explain to me how I would "pass to it as a
command line argument a string that contains the path and
file name of the Users DB "

I'm pretty sure that i will distribute individual copies
of the Updater.mdb, but in case I don't I would like to
know how to do the above.

Thanks for your help,
Katrina

>-----Original Message-----
>Katrina,
>To achieve this you need to have another Access Db (or VB

executible) on the
>server eg DBUpdate.mdb
>
>When the user clicks the Update button it uses the Shell

cmd to launch
>DBUpdade, passing to it as a command line argument a

string that contains
>the path and file name of the Users DB (to be updated).

The button then
>closes the User's DB.
>
>DBUpdate tries to rename the User's DB and if it fails,

it waits and tries
>again (however many times, say 3 times with 5 second

delays), once it
>renames the user's DB, it copies the updated DB to the

User.
>
>You could also use replication to achieve this and you

could also deploy
>copies of DBUpdate to each User PC aleviating the need to

find the UNC to
>pass to it.
>
>Doug
>
>"Katrina" <(E-Mail Removed)> wrote in

message
>news:006901c423ee$de865270$(E-Mail Removed)...
>> We have a database that will probably end up on people's
>> hard drives. The database will not need to be updated
>> that often, maybe once every three months.
>>
>> I was asked to make a button in the database that would
>> allow the user to easily update his/her hard drive copy
>> (UserDB).
>>
>> Basically, they would like to push a button to copy one
>> folder containing the database and the information

within
>> (the master copy) to the current storage location.
>>
>> I can figure out all the logistics except how to close
>> UserDB so that I can copy over it. I set up another
>> database (Updater.mdb) to run the code of copying over

the
>> folder, and I can open it from UserDB, but how do I

close
>> UserDB before running the code in Updater.mdb. Right

now
>> Updater is set up to run the copying code

automatically...
>>
>> Thanks for your help

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link form another database table into current database Anna Microsoft Access Forms 2 16th Aug 2006 09:57 PM
Making a copy of the current database using code Janelle.Dunlap@ge.com Microsoft Access 3 31st May 2006 01:19 AM
Make Copy Of Current Database File =?Utf-8?B?TWFydGlu?= Microsoft Access 2 20th Jan 2006 05:26 AM
Opening a copy of the current database through VBA code Adam Microsoft Access 13 15th Sep 2003 01:58 AM
Copy of current database Dorian Chalom Microsoft Access VBA Modules 4 31st Jul 2003 03:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 PM.