Code to copy (.mdb) file to PC?

GoinDeep

Registered User.
Local time
Today, 14:53
Joined
Oct 9, 2002
Messages
43
I have an access file which is used by several clients throughout our company.

My problem is the file is constantly being revised an it isn't practical to instruct the users to replace the file on thier pc with the latest revisions from the server.

Is there a way to prompt a string of code to copy and replace the existing file on their pc with with the latest revision from the server?

Thanks!
 
Hello!

It sounds like each client has a copy(s) of the data tables?

If that is true, you should split the database. The tables would be on one file on the backend server and the rest of the objects on each of the front end client servers.

Each client would then attach to one data table (or more)
 
Currently the database is split with the table's on the server "backend" and links to the client database "frontend".

The frontend has several reports and querries which are constantly being updated in this developmental phase of the project.

Any thoughts?
 
Assumedly, all the front ends are kept in the same location on the C: drives? if so, consider using an update database kept centrally which does something like...

If FileDateTime("PathToLocalVersion")<FileDateTime("PathToMostRecentVersion") Then
FileCopy "PathToMostRecentVersion","PathToLocalVersion"
End if

Then your users can open the update database and if their local file is older than the most recent version, overwrite it.

Alternatively, if this doesn't work because of modifications made by the user to local data, then you prefer to use version control by naming the newer version as DB_V28 where the last version issued was DB_V27

If Len(Dir("C:\WhereverLocalDBIsStored\DB_V28.mdb"))=0 Then 'file doesn't exist on users drive so copy across and kill old version

FileCopy "NetworkPathOfNewestVersion" , "NewLocalPathForFile"
Kill "OldLocalPath"
End if

My advice is to warn your users not to create their own queries and reports as you will overwrite the lot and they will not be gruntled.

unfortunately, i don't have an example to offer but you've got a starting block
 
Or you could:

1) Create a table in the "master" db that keeps track of version numbers for each of your forms and tables.
2) Create the same table for the "client" databases.
3) Create a startup form that runs a check between the two tables Master - Client. (this could be done with a simple query)
4) For each case where Master_Version_Number is greater then Client_Version_Number delete the client side form/report and import the new form/report.

I believe a version of each of these steps has been touched on in this forum. I would suggest that you create a splash-screen type form that runs the code and then shuts itself down.

Peace
 

Users who are viewing this thread

Back
Top Bottom