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
> Getting The Full Build Number In Vba, Access 2016    
 
   
ngins
post Nov 19 2019, 12:34 PM
Post#1



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


I use Application.Build to get the Access build number. But it only returns the major part -- the part to the left of the decimal. Does anyone know how to get the full build number (apart from looking at the Account screen)?

I read in a post somewhere that Application.BuildFull will return the full build number. But that property doesn't seem to be available in Access 2016.

Any ideas?

Thanks.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
isladogs
post Nov 19 2019, 12:50 PM
Post#2


UtterAccess VIP
Posts: 1,904
Joined: 4-June 18
From: Somerset, UK


See this example in the code archive Access Version Checker

In particular see the code for the GetAccessBuildVersion function

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
ngins
post Nov 19 2019, 12:57 PM
Post#3



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


Thanks, but, no, that also just returns the major Build number, not the minor part of it. Your code:

CODE
SysCmd(acSysCmdAccessVer) & "." & SysCmd(715)


Uses SysCmd(715) to get the Build number. That returns the same value as Application.Build -- i.e., just the part to the left of the decimal.

E.g., running this on my machine I get:

16.0.12130

instead of

16.0.12130.20390

--------------------
Neil
Accessing since '96
Go to the top of the page
 
isladogs
post Nov 19 2019, 01:30 PM
Post#4


UtterAccess VIP
Posts: 1,904
Joined: 4-June 18
From: Somerset, UK


Ah sorry I misunderstood what you wanted.

You can do this in more than one way e.g using WMI or file scripting object.
But you might like to use this function by Daniel Pineault GetVerInfo
For example I just got

CODE
?getverinfo("msaccess.exe")
14.0.7230.5000

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
ngins
post Nov 19 2019, 01:36 PM
Post#5



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


Thanks. Yeah, actually I had come across that when I searched the web before posting here. But for some reason it didn't work for me. It gives me the error:

QUOTE
Invalid root in registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\C:\Program Files (x86)\Microsoft Office\Root\Office16\msaccess.exe\".


I'm calling it as follows:

QUOTE
getverinfo(Application.SysCmd(acSysCmdAccessDir) & "msaccess.exe")


So, not sure what the problem is.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
isladogs
post Nov 19 2019, 01:41 PM
Post#6


UtterAccess VIP
Posts: 1,904
Joined: 4-June 18
From: Somerset, UK


Just try running the code as I did without the Application.SysCmd part

Just out of interest, why do you need to know the minor build number in vba?

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
ngins
post Nov 19 2019, 01:56 PM
Post#7



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


Oh yeah, I'm pretty stupid. I was passing it the whole path instead of just the EXE that it needed. Even a casual look at the error message would have shown the problem. (To be fair, I am pretty tired right now. Still that's no excuse.)

OK, yeah, that works. Thanks again for your help! (Sometimes stupid people such as myself need a little guidance....)

--------------------
Neil
Accessing since '96
Go to the top of the page
 
isladogs
post Nov 19 2019, 02:00 PM
Post#8


UtterAccess VIP
Posts: 1,904
Joined: 4-June 18
From: Somerset, UK


No problem. But you didn't answer my question. Why do you need the minor build info in VBA?

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
ngins
post Nov 19 2019, 02:09 PM
Post#9



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


Sorry, I didn't see your question. I only read the first paragraph in your reply. (I told you I was tired....) Here's why I need it.

Microsoft released the fix for the 3340 bug yesterday. However, my client uses the Runtime version of Access on most of his machines. The Runtime version doesn't have a File | Account menu item where you can easily check the full version and release number. However, my database has a log that's completed each time a user logs in, and notes, among other things, the version number of Access they're running (so that if they have a problem, we can see if they have the latest version). So my log-in log would be a way to see the Release number in the Runtime version, for which there is no other way.

That being said, the update that Microsoft released yesterday doesn't change the major Release number. It only updates the minor Release number (since this is a patch, not an actual release). Thus, the major number remains the same after the update, and the only way to know that the update has been applied is by checking the minor Release number. So that's why I needed it.

Now, at this point you might be asking: why is this an issue with the Runtime version? The Runtime version is a standalone program that isn't updated with Office 365 updates. But, apparently it is. All of the users using Runtime got updated to the version with the bug. So, apparently, even though the Runtime version is installed separately, and isn't a part of Office 365, Microsoft still updates it when it updates Office 365. Go figure.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
isladogs
post Nov 19 2019, 02:24 PM
Post#10


UtterAccess VIP
Posts: 1,904
Joined: 4-June 18
From: Somerset, UK


Gotcha.
Thought it might be related to the corrupt query bug
You've also proved that an answer I gave at MSDN forums about runtime versions not being updated was incorrect....but also that the original point by another user was incorrect.

In light of this recent debacle, I may update my Access Version Checker & Jet ShowPlan Manager apps to include the minor build number

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
ngins
post Nov 19 2019, 02:49 PM
Post#11



Posts: 365
Joined: 18-August 05
From: DFW, TX, USA


Yeah, the conclusion I've drawn is that when you install the runtime version, you're actually installing the same program that everyone else runs except with restrictions in place so that it's limited. That would explain why you can emulate the runtime environment with the /runtime switch or with the ACCDR extension . So when you install runtime, you're actually installing a version of the access program, not a separate program, and that, apparently, is why it gets updated. Which makes sense.

--------------------
Neil
Accessing since '96
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th December 2019 - 11:08 AM