INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

*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

Multi User Databases

How to make sure all of the users are using the most current version of the front end? - alternate method by fdalmoro
Posted: 13 May 03

I saw another FAQ on this topic but I think it's too complicated for a beginner. I think this way is a lot easier.

1. Make a vbs script that will compare the file modified date between a network master frontend and a local copy, and will copy the newer file down to the local computer only if it's newer than the local. Put this vbs script somewhere on the network where the users can access it. This is an example of what I use.


Function Update( source, target )
Dim f1,f2,d1,d2,c1,c2
  If fs.FileExists( source ) then  
    set f1 = fs.GetFile( source )   
    d1 = f1.DateLastModified   
    c1 = Year(d1) * 10000 + Month(d1) * 100 + Day(d1)   
    If fs.FileExists( target ) then      
        set f2 = fs.GetFile( target )      
        d2 = f2.DateLastModified      
        c2 = Year(d2) * 10000 + Month(d2) * 100 + Day(d2)   
    Else      
        c2 = 0   
    End If   
    If c1 > c2 then     
    ' overwrite local copy with the network version
        f1.Copy target,True   
    End If
  End If
End Function

Dim fs
set fs = WScript.CreateObject("Scripting.FileSystemObject")
s = "\\servername\servershare\mastermdbname"
t = "C:\mdbname"
Update s, t


2. On the user's desktop create a SHORTCUT to the vbs and put it in the startup folder in the start menu. DO NOT COPY THE SCRIPT TO THE STARTUP FOLDER. I prefer not to copy the vbs to the startup because if you ever decide to modify the vbs, you only do it once.

3. Run the script once by logging out then back in or by clicking on the shortcut that you just put in the startup. This will copy the initial front end to c:.

4. Create a shortcut to c:\mdbname on the desktop, quick launch or start menu.

You are now ready to launch the database.

*****NOTES*****
Do not run the vbs script when you have the database open. That's why it's better to keep it in your startup to avoid double executions and so on.
***************

What this allows also is continuing development and modifications to the mdb fronend program while users are accessing the data without interruptions and faster launch times.

Have Fun,

Fernando

Back to Microsoft: Access Modules (VBA Coding) FAQ Index
Back to Microsoft: Access Modules (VBA Coding) Forum

My Archive

Resources

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