UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Auto-update With Multiple Versions Of Access, 2007    
 
   
everettmiller
post Jan 29 2015, 12:53 PM
Post#1



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


Hey Forum!

My office is currently using Access2007, but we have begun the migration to Access2013. My database uses versioning to copy a new client file to the workstation. During login to the database, if the version of the workstation client does not match the version of the server client then a vbsscript is executed that closes the currently open access database, copies the new client to the workstation, and then finishes by opening the new version on the client workstation. This script has been working flawlessly but now I need to modify it to test for the version of access installed on the workstation and then download the appropriate client. The code for the vbscript I'm using now is shown below.

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE name = 'MSAccess.exe'")
For Each objProcess in colProcessList
objProcess.Terminate
Next

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.copyFile "p:\client\plato.accdb", "c:\users\public\documents\", True

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "c:\users\public\documents\plato.accdb"

Until our migration to Office 2013 is complete, there will be two client versions, one for 2007 and another for 2013. Both will be stored in the same folder on the server and the vbscript I'm looking for should determine what version of access is installed on the workstation and then copy the correct client version to the workstation.

Unfortunately, I'm a complete noobie when it comes to vbscripting and I would appreciate any help or direction on modifying the vbscript to make it work in a blended shop.

Many Thanks in advance!!

Everett
Go to the top of the page
 
ScottGem
post Jan 29 2015, 01:03 PM
Post#2


UtterAccess VIP / UA Clown
Posts: 32,181
Joined: 21-January 04
From: LI, NY


QUOTE
there will be two client versions, one for 2007 and another for 2013


Why?? Access 2013 will run Access 2007 database, mostly without issue. Why maintain 2 version until the upgrade to Office 2013 is complete?

This article has a code snippet that will do it:

http://www.tek-tips.com/viewthread.cfm?qid=1088751

There are other examples on the Web.
Go to the top of the page
 
everettmiller
post Jan 30 2015, 12:30 PM
Post#3



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


After reading your reply I went digging further and determined that there are a small number of referenced libraries that are version specific. Specifically, the Microsoft Calender Control 2007 along with the 12.0 versions of the Access Object Library, Office Object Library and the Outlook Object Library. While Access 2013 will read these libraries, it does not support the Calendar control. And Access 2007 does not support the 2013 version of the libraries. I think I can do without the Calender control by using the native datepicker, however the object libraries are still a concern.

Thanks!

Everett
Go to the top of the page
 
theDBguy
post Jan 30 2015, 12:50 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,196
Joined: 19-June 07
From: SunnySandyEggo


Hi Everett,

Assuming that your versioning check is ran through the FE, then using something like:

Application.Version

should give you what version of Access is the user running. You can then use that information to execute the proper script.

Just a thought...
Go to the top of the page
 
everettmiller
post Jan 30 2015, 01:03 PM
Post#5



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


Hey DBGuy!

Yep, that's basically what I've just completed. The version check is in the FE and the code now executes a SYSCMD(acSysCmdAccessVer). If the version is 12.0 then the code executes the 2007 script and if the version is 15.0 the the 2013 script is executes. The limited testing so far has all been successful so it may be that this is no longer an issue.

Thanks for the help, guys! What first appeared to be a fairly big question now appears to have been a non-issue.

Everett
Go to the top of the page
 
theDBguy
post Jan 30 2015, 01:08 PM
Post#6


Access Wiki and Forums Moderator
Posts: 71,196
Joined: 19-June 07
From: SunnySandyEggo


Hi Everett,

Congratulations on getting it sorted out. Scott and I were happy to assist. Good luck with your project.
Go to the top of the page
 
ScottGem
post Jan 30 2015, 01:17 PM
Post#7


UtterAccess VIP / UA Clown
Posts: 32,181
Joined: 21-January 04
From: LI, NY


The Calendar Control is an issue, but since 2007 has the built in datepicker, eliminating it from your 2007 FE should be fine.

Have you tested running the 2007 version within a 2013 installation? I think you will find those Object libraries backward compatible. So before you try maintaining 2 FE versions, I would make sure that is necessary.
Go to the top of the page
 
everettmiller
post Jan 30 2015, 01:24 PM
Post#8



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


Scott,

That's a series of tests going on now and I expect that by Monday morning I'll have the answer. My expectation is that the 2007 FE will run fine (excepting the Calender control) in the 2013 application, but the 2013 FE will not do so well in the 2007 application.
Go to the top of the page
 
ScottGem
post Jan 30 2015, 01:37 PM
Post#9


UtterAccess VIP / UA Clown
Posts: 32,181
Joined: 21-January 04
From: LI, NY


QUOTE
My expectation is that the 2007 FE will run fine (excepting the Calender control) in the 2013 application, but the 2013 FE will not do so well in the 2007 application.


Your expectation is probably correct. So my question is why have a 2013 version? What would you be doing in the 2013 version that can't be done in 2007? Just distribute the 2007 version until everyone has been upgraded and maintain ONE FE.

Once everyone has been upgraded, then you can switch the the 2013 FE and your auto update code doesn't have to change.
Go to the top of the page
 
everettmiller
post Jan 30 2015, 02:53 PM
Post#10



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


Scott,

That sounds almost too easy to be possible, especially in my case.... smile.gif Nonetheless, it will be what I do going forward. The more I work with this question, the more I'm convinced that the only real problem I had was with the Calendar control. I disabled that on a workstation a little while ago and, so far, there have been no issues or problems. So, it may just be a case of me seeing a forest when there was really just a single tree.

I'm expecting the next batch of upgrades next week so I'll be posting some results as soon as they come in.

Til then.... thanks for the help!

Everett
Go to the top of the page
 
ScottGem
post Jan 30 2015, 02:58 PM
Post#11


UtterAccess VIP / UA Clown
Posts: 32,181
Joined: 21-January 04
From: LI, NY


I've often mentioned that I'm lazy wink.gif I tend to look for the solution that is the path of least resistance. And that's what I saw in your problem. I've had to deal more than a few times with multiple version issues. My solution is always to code for the lowest version in use and maintain that one front end. Only upgrading when everyone is at a higher version.
Go to the top of the page
 
everettmiller
post Jan 30 2015, 03:12 PM
Post#12



Posts: 163
Joined: 9-May 11
From: Columbus, GA USA


Scott,

In my case, too, LAZY is the operative word..... That's why I'm liking your approach more and more!! LOL

Now, off to the next question: locking down and securing the BE file....

Thanks!
Go to the top of the page
 
ScottGem
post Jan 30 2015, 03:53 PM
Post#13


UtterAccess VIP / UA Clown
Posts: 32,181
Joined: 21-January 04
From: LI, NY


QUOTE
next question: locking down and securing the BE file....


Check out my blog on Securing the back end!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 02:49 AM