Weird problem passthrough query in VBA just started pulling Null values for decimals (1 Viewer)

Zedster

Registered User.
Local time
Today, 10:16
Joined
Jul 2, 2019
Messages
168
I use a version control system on all my databases to force users to use the latest front end version.

Each front end has a hard coded variable dblThisVersion which I increment with new releases. On a SQL server there is a table that stores the latest version number for each database (this I also increment with new releases).

When the database starts up the following query is ran in VBA as a passthrough qdf.

SQL:
SELECT VC_ID,VC_Database,VC_LatestVersion FROM tblVersionControl WHERE VC_Database = 'Required Database';

The code then compares the value of VC_LatestVersion (Decimal 5,2) with dblThisVersion. If it doesn't match the front end closes down. The code doing this is simple:

Code:
If dblThisVersion < rst!VC_LatestVersion Then

This has worked fine for all users for many months. Two days ago it stopped functioning for one user and started throwing data mismatch errors on the above line (it had previously worked fine). After a lot of trial debugging it appears that the passthrough query shown below when executed in VBA returns no values for the field VC_LatestVersion, I suspect it is returning Nulls.

SQL:
SELECT VC_ID,VC_Database,VC_LatestVersion FROM tblVersionControl

Yet when the same query is stored as a passthrough query in the database runs fine and returns the numeric values.

I cannot fathom out why. It has always ran fine in the past and still runs fine for everyone else, it is just this one user that has an issue that started 48 hours ago. The only changes he has made to his computer is to install a program called "VooV" conference call, two days ago. He has since uninstalled it, but it has made no difference. I have also sent him a new master database and it still will not work.

Anyone have any ideas because I am all out of them.
 

Zedster

Registered User.
Local time
Today, 10:16
Joined
Jul 2, 2019
Messages
168
Hi Minty, thanks for that, it has a good chance of being the issue because it only happens in DAO which I am using, other tables and passthrough queries report the number fine. I've spent close to a day trying to fathom out what is wrong with something that appears to be coded fine!

One question though. Most of my users are running Ms Access Runtime. Do you or anyone have any idea how I can find out the release version and release date of Ms Access runtime?
 

Minty

AWF VIP
Local time
Today, 10:16
Joined
Jul 26, 2013
Messages
10,367
Other than inspecting their machines not easily. In the immediate window you can use
?currentproject.Application.Version
16.0

So you could add a text box control to display that within the app?
 

Users who are viewing this thread

Top Bottom