Results 1 to 4 of 4
  1. #1
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15

    Front end changes

    Hi all,
    Frequent reader first time poster. I'm relatively new to access so I'm trying to wrap my mind around this. I split my database and will have each user store the front end on their individual PC. When I need to update the front end how does this work? Let's say I'm editing the front end on my pc. Do I just re-send the front end file to everyone to use? And will it work as long as i dont change the file name? Or should i be changing the file name and relinking it? What happens if some people keep using the old front end? Its hurting my brain to think how this works.

    Sorry so many questions in 1 post!

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    That's the approach I use, and it works fine. I do all my development on my own PC, using a COPY of the back end, so if I try something that doesn't work, there is no harm done. When it come time to deploy the update to the users, I just re-link all the tables to the production copy of the back end file, and tell my users (there are not many) to install the new version.

    You can change the name of the front end, but you should leave the back end alone. If people keep using the older version of the FE, it will still work, but a) they won't have the benefit of benefit of enhancements and b) more importantly, if the update reflects business process changes, users who don't upgrade may be doing things "wrong". Your notice of upgrade should include what the changes are and why they are being made, so that everyone is aware .

    HTH

    John

  3. #3
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    I have an automatic updater (sort of).

    It's a bit long winded and convoluted but its been working a charm for me for the last 10 months or so.

    Firstly you implement a 'launcher' file, which contains the code to update the frontend you actually want people to use, (on the users machine this must in this example be co-located with the 'local' frontend). And move a 'master frontend' to a location (preferably near your tables so everyone using it can access it)

    You will need to implement two version tables one in the backend (Tbl_R_version, with two fields, RV_ID,RV_Date), one in the frontend (Tbl_L_Version, again with two fields LV_ID, LV_Date). Set the ID fields to autonumber, and the dates, to date.

    Then in the launcher files forms open event I then use a piece of code, to check the two versions i.e:

    Code:
    dim localfile as string
    dim serverfile as string
    dim backend as string
    dim localversion as string
    dim remoteversion as string
    dim cmdtoopen as string
    backend ="filepath to your backend goes here"
    localfile = currentproject.path & "\" & "frontend filename here"
    serverfile = "filepath to the master frontend"
    set rst = currentdb.openrecordset("select max([LV_ID]) as myrmax FROM [Tbl_L_Version] IN '" & serverfile & "'", dbopensnapshot)
    remoteversion = rst!myrmax
    rst.close
    set rst = currentdb.openrecordset("SELECT max([LV_ID]) as mylmax FROM [Tbl_L_Version IN '" & localfile & "'", dbopensnapshot)
    localversion = rst!mylmax
    rst.close
    if remoteversion >localversion then
    if dir(localfile) <> "" then
    kill localfile
    endif
    filecopy serverfile,localfile
    endif
    cmdtoopen = """"&syscmd(acsyscmdaccessdir) & "msaccess.exe"""& " """ & localfile & """"
    shell cmdtoopen, vbnormalfocus
    docmd.quit
    Then, to prevent people circumventing the launcher and using the frontend directly and skipping out on an update I insert this code on the frontend startup form, on the open event.

    Code:
    Dim Local_Version as long
    Dim Remote_Version as long
    
    Local_version=dmax("[LV_ID]","[Tbl_L_Version]")
    Remote_Version=Dmax("[RV_ID]","Tbl_R_Version]")
    if remote_Version>Local_version then
    msgbox "Your frontend is out of date, please use the launcher to run this program and receive updates. The file will now close"
    docmd.quit
    I also implement a small section of code to prevent users just running the 'master' frontend this again goes on the start forms open event (on the frontend).

    Code:
    dim denialpath as string
    dim filepath as string
    denialpath="filepath to master frontend goes here"
    filepath=currentproject.path
    if filepath=denialpath then
    msgbox "Running the database from this location is disabled as it prevent propagation of user update, please run your local frontend. The database will now close"
    docmd.quit
    endif
    Right I think i have confused everyone long enough! I have a section of code I use on my master file to lockdown and unlock the master database, and automatically create mde's and place then in the relevant area and update the associated tables, but right now my fingers are tired! (that wasnt copypasted it was hand typed from my second screen!). If you have any questions on it, please ask, but in all honesty my brain rarely functions on more than one cylinder lately, so please forgive me if nothing makes sense!

    (admittedly I did tidy the code up a little and use good names and and naming conventions as i now do, but i did not use myself initially and believe me I wish I did!)

  4. #4
    PRMiller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    St. Paul, MN
    Posts
    16
    R_Badger, that's a great method, thank you for sharing!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Custom Front End
    By rogueakula in forum Access
    Replies: 1
    Last Post: 05-04-2012, 07:40 AM
  2. Some VBA not working in front end.
    By gdpoc in forum Programming
    Replies: 0
    Last Post: 03-07-2012, 04:08 PM
  3. update front end mde
    By slimjen in forum Access
    Replies: 2
    Last Post: 10-31-2011, 11:37 AM
  4. Making changes to front end.
    By OrangePie in forum Access
    Replies: 4
    Last Post: 07-27-2011, 11:19 AM
  5. Front-End Ballooning
    By jgelpi16 in forum Access
    Replies: 4
    Last Post: 12-21-2010, 10:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums