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!
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: - 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.
- Copy and Paste the following code to the Form's Timer() Event, it will be executed every 2 minutes. This code will:
- Dim appAccess As Access.Application
-
Dim varProjectVersion As Variant
-
Dim varLocalVersion As Variant
-
Const conOPEN_EXCLUSIVE As Boolean = False
-
-
'************* Interrogate the Access Project for its Version *************
-
'Initialize String to Patabase Path
-
Const conPATH_TO_PROJECT = "C:\_TheScripts\_Active Projects\NorthWindCS.adp"
-
-
Set appAccess = CreateObject("Access.Application")
-
-
'Open Project in Microsoft Access window.
-
appAccess.OpenAccessProject conPATH_TO_PROJECT, False
-
-
'Retrieve the Project Version via Automation and store in Variable
-
varProjectVersion = appAccess.SysCmd(acSysCmdAccessVer)
-
-
appAccess.Quit
-
Set appAccess = Nothing
-
'******* All done as far as the Project on the Server is concerned ********
-
-
'***************** Now, let's retrieve the Local Version ******************
-
varLocalVersion = Application.SysCmd(acSysCmdAccessVer)
-
-
'For testing purposes only
-
Debug.Print "Server Version: " & varProjectVersion & _
-
" <==> Local Version: " & varLocalVersion
-
-
'Let's compare both the Local and Server Versions
-
If varLocalVersion < varProjectVersion Then
-
MsgBox "The Local Version is less than the Server Version, Upgrade time!", _
-
vbExclamation, "Local Version < Server Version"
-
ElseIf varLocalVersion = varProjectVersion Then
-
MsgBox "Versions on both the Server and Client are the same!", _
-
vbInformation, "Versions Same"
-
Else 'Local Version greater than the Server Version, should never happen?
-
MsgBox "Time to Upgrade the Server Version", vbExclamation, "Upgrade Server"
-
End If
-
-
'At some point do you wish ti disable the Timer?
-
'Me.TimerInterval = 0
- 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.
- Once you have opened the Access Project and set an Object Variable to Reference it, you can retrieve its Version Number.
- Close the Automation Session.
- Retrieve the Current Database Version.
- Make comparisons between the two and make decisions.
- This code will be executed every 2 minutes.
- That's it. Any questions, please feel free to ask.
- Good Luck and Good Night!
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)>
.
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?
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 :)
Sounds like a challenging project!
Linq ;0)> 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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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*
|
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.
|
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...
| |
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:
|
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
|
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!
|
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
|
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...
|
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...
| |
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,...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |