473,777 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Application that Checks for New Version

14 New Member
Good afternoon folks:

I am maintaining an Access application (in the form of a compiled ADP project, *.ade) that currently gets installed on client machines via a Windows VBScript. Right now when I push an update, I compile the project into the install folder on the network and Email all my users with the script attached. The users open the script and it installs a local copy from the network onto their desktop.

Now, I'm curious if there is a way to have Access automatically check every few minutes to see if there is a new version of the main ADE file on the network, and if there is, to throw up a message box to the user telling them to re-install. Ideally the process would look like this:

1. Updated ADE file is saved to the network
2. Every 2 minutes the clients check the network file and see if the version number updated
3. If version number updated, display message to user telling them a new version is available, with two options:
-Install Now
-Install Later
4. If Install now is selected, Access exists and the install script I already have written is ran
5. If Install Later is selected, Access runs and the message will re-appear during the next scheduled version check

I've done something similiar using Java and C++, but I'm not sure if Access/VBA can accomodate this kind of automated version checking :) Any insight or tips would be appreciated!
Jul 30 '08 #1
6 4968
ADezii
8,834 Recognized Expert Expert
First and foremost, this code is right off the top of my head and has no guarantee whatsoever. Initial testing did prove successful, but it hasn't been tested extensively, and I really do not have the time. Here goes:
  1. On your Main Form set the Timer Interval to 120000. This Property is calibrated in milliseconds, so 120000 would be equivalent to your requested 2 minutes. Do not close this Form since that will disable the Timer, you can Minimize it or make it invisible, but do not close it.
  2. Copy and Paste the following code to the Form's Timer() Event, it will be executed every 2 minutes. This code will:
    Expand|Select|Wrap|Line Numbers
    1. Dim appAccess As Access.Application
    2. Dim varProjectVersion As Variant
    3. Dim varLocalVersion As Variant
    4. Const conOPEN_EXCLUSIVE As Boolean = False
    5.  
    6. '************* Interrogate the Access Project for its Version *************
    7. 'Initialize String to Patabase Path
    8. Const conPATH_TO_PROJECT = "C:\_TheScripts\_Active Projects\NorthWindCS.adp"
    9.  
    10. Set appAccess = CreateObject("Access.Application")
    11.  
    12. 'Open Project in Microsoft Access window.
    13. appAccess.OpenAccessProject conPATH_TO_PROJECT, False
    14.  
    15. 'Retrieve the Project Version via Automation and store in Variable
    16. varProjectVersion = appAccess.SysCmd(acSysCmdAccessVer)
    17.  
    18. appAccess.Quit
    19. Set appAccess = Nothing
    20. '******* All done as far as the Project on the Server is concerned ********
    21.  
    22. '***************** Now, let's retrieve the Local Version ******************
    23. varLocalVersion = Application.SysCmd(acSysCmdAccessVer)
    24.  
    25. 'For testing purposes only
    26. Debug.Print "Server Version: " & varProjectVersion & _
    27.             " <==> Local Version: " & varLocalVersion
    28.  
    29. 'Let's compare both the Local and Server Versions
    30. If varLocalVersion < varProjectVersion Then
    31.   MsgBox "The Local Version is less than the Server Version, Upgrade time!", _
    32.           vbExclamation, "Local Version < Server Version"
    33. ElseIf varLocalVersion = varProjectVersion Then
    34.   MsgBox "Versions on both the Server and Client are the same!", _
    35.           vbInformation, "Versions Same"
    36. Else    'Local Version greater than the Server Version, should never happen?
    37.   MsgBox "Time to Upgrade the Server Version", vbExclamation, "Upgrade Server"
    38. End If
    39.  
    40. 'At some point do you wish ti disable the Timer?
    41. 'Me.TimerInterval = 0
    1. Open the Access Project on the Server (substitute your Path) within the context of your Access Window making it the Current Database. The Project is opened via Automation and the OpenAccessProje ct() Method.
    2. Once you have opened the Access Project and set an Object Variable to Reference it, you can retrieve its Version Number.
    3. Close the Automation Session.
    4. Retrieve the Current Database Version.
    5. Make comparisons between the two and make decisions.
    6. This code will be executed every 2 minutes.
    7. That's it. Any questions, please feel free to ask.
  3. Good Luck and Good Night!
Jul 31 '08 #2
missinglinq
3,532 Recognized Expert Specialist
ADezii's code is usually spot on, so I expect it'll do the job, but I've got to tell you, checking for front end updates every few minutes is a gross case of overkill, and will chew up system resources! Although I've never had any problems, the literature has a number of reports of the continuous use of the Timer causing graphics problems, such as controls intermittently flickering/flashing. The usual strategy that is used by developers who do frequent front end updates is to check for updates either each time the database is opened or the first time it's opened for the day.

I've always thought that users should be notified of any changes that have been made, unless the changes were totally seamless and invisible as far the end users were concerned.

Welcome to Bytes!

Linq ;0)>
.
Jul 31 '08 #3
ADezii
8,834 Recognized Expert Expert
ADezii's code is usually spot on, so I expect it'll do the job, but I've got to tell you, checking for front end updates every few minutes is a gross case of overkill, and will chew up system resources! Although I've never had any problems, the literature has a number of reports of the continuous use of the Timer causing graphics problems, such as controls intermittently flickering/flashing. The usual strategy that is used by developers who do frequent front end updates is to check for updates either each time the database is opened or the first time it's opened for the day.

I've always thought that users should be notified of any changes that have been made, unless the changes were totally seamless and invisible as far the end users were concerned.

Welcome to Bytes!

Linq ;0)>
.
Excellent points, Linq. My last question to the OP, which I forgot to ask, is why the 2 minute Interval?
Jul 31 '08 #4
adversus
14 New Member
The application in question is used for the processing of a large scale data migration and merge project. Due to the ever changing nature of the data requirements, it sometimes become necessary to make several modifications in a single day.

After thinking on it, I agree the quicker checks is overkill. I'll probably change it to every 20-30 minutes and see what thats like. And if it is a critical update, I can push it out the current way (via email and an install script).

Thanks for the direction, I'll take a look at this and see if it'll work for my scenario :)
Jul 31 '08 #5
missinglinq
3,532 Recognized Expert Specialist
Sounds like a challenging project!

Linq ;0)>
Jul 31 '08 #6
ADezii
8,834 Recognized Expert Expert
The application in question is used for the processing of a large scale data migration and merge project. Due to the ever changing nature of the data requirements, it sometimes become necessary to make several modifications in a single day.

After thinking on it, I agree the quicker checks is overkill. I'll probably change it to every 20-30 minutes and see what thats like. And if it is a critical update, I can push it out the current way (via email and an install script).

Thanks for the direction, I'll take a look at this and see if it'll work for my scenario :)
Don't forget that if you are setting the Timer Interval for 20 or 30 Minutes, the values would be 1200000 and 1800000 respectively.
Jul 31 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

14
4188
by: wolftor | last post by:
1) Is there a free runtime version of Access available that is more recent than the one for Access 2000? 2) If I create an application (MDE) in A2K, will it run on all later versions of Access? 3) If I create a CD using A2K Developer that includes the runtime version of Access 2K and an installation package, and if someone tries to install the application from the CD, what happens if someone already has Access 2000 or a later version...
17
2809
by: Jelmer | last post by:
Hi, I am mildly familiar with ms access developement and I have been asked to port and document a ms access app. I expect the porting (97 to XP) to be fairly straightforward. However documenting it is another matter. How do you people document your access apps? Just create an ERD and have comments in the vba code? List all the forms and it's purpose ? Are there any methodologies / best practices / examples I can look at? thanks in...
20
3347
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to speed. I like books with practical exercises, and also with test questions (like cert books) *2*
4
7188
by: Br | last post by:
We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000 was released after Access2000 you need to be running Access2000 SP1 (2 or 3) for it to work properly. Is there an easy way for the ADP to determine programatically wether the correct service pack is installed (or if they are using a newer version such as 2002/2003)? Ta.
92
7677
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried to find out who it is that actually wants to get rid of it, but I can't find anyone who will admit to trying to get rid of it. Nevertheless, I'm always hearing about how their "phasing it out" or "getting rid of it". Because no-one owns up I can't...
7
4780
by: Martin Strojek | last post by:
Hi, I have the following problem with developing some web site. I use Visual Studio 2003 to build a website. I tried Windows 2003 Server and switched now back to Windows XP with PWS but the error occurs in both installations. When I do a compile/build of my app and go to the browser and hit reload there comes an error:
17
3153
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 - Access 2000; folder with back-ends for both computers and 'Update' folder. I have a launcher program that launces my application (MyApp). The launcher program also checks for updates to MyApp located in 'Update' folder (on
10
409
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Thank you for that. It was very clear and I actually understand it!
16
5191
by: Phil Stanton | last post by:
I have a form with a button which is supposed to open an Excel file (With lots of Macros /VBA) in it. The Excel file gets it's data from the Access program Here is the code Private Sub Storage_Click() On Error GoTo Err_Storage_Click
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.