VBA code not running on all machines (1 Viewer)

kevlray

Registered User.
Local time
Today, 15:12
Joined
Apr 5, 2010
Messages
1,046
I created a small DB for another user. It has one macro (VBA) assigned to a button. When I try it on my machine (Office 2007 32 bit) and a test machine (Office 2013 32 bit), it works fine. But when I try it on the user's computer, nothing happens when we click on the button.

I have checked the trust settings (even selected to let any macro run). The trusted location is set. The strange part is that it was working a few months ago.

I have requested to our IT service desk to do a repair on her office to see if that helps. Any other suggestions would be appreciated.
 

Ranman256

Well-known member
Local time
Today, 18:12
Joined
Apr 9, 2015
Messages
4,337
its possible the access on his pc has macros disabled.
go into access settings and allow macros to run.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:12
Joined
Feb 19, 2013
Messages
16,605
have you tried stepping through the code to see if the event is triggered?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:12
Joined
Feb 28, 2001
Messages
27,167
The installation of Office has a pot-load of options, which might exclude certain libraries. Without knowing a more preciser message or indication, it is not possible to rule out broken references, because library names DO change from one version of Access to another. Not big changes, but to the file system, a change is a change. E.g. the DAO library might change from DAOLib23.DLL to DAOLib25.DLL (or something like that, and I don't recall the exact name of the library so don't hold my feet to the fire.) The idea is that the version number of the library is encoded in the name. Normally, Access would find the changed version - but because of the differences available in how the package was installed, it doesn't ALWAYS find everything.
 

kevlray

Registered User.
Local time
Today, 15:12
Joined
Apr 5, 2010
Messages
1,046
I did not think about a missing reference (but normally get an error message). Instead, nothing happens when I click on the button (i.e., like events being ignored). I think I even put a break point in the code (it never got there).
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:12
Joined
Feb 19, 2013
Messages
16,605
I think I even put a break point in the code (it never got there).
Doesn't help. Why not put it in again and run the code again, then you'll know and can let us know.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:12
Joined
Feb 28, 2001
Messages
27,167
The question that now comes to mind is, does ANY event fire on the database running on the miscreant system? But deeper than that, can you navigate to different records on the forms? Whether or not a user event is firing, the Access internal OnCurrent event HAS to fire on a bound form as the result of a record navigation because that event is what updates all the bound fields - and as a side note, calls the user defined OnCurrent event routine.

This question is intended to rule things out, not necessarily guaranteed to be immediately enlightening. I'm trying to discern the scope of the problem.
 

kevlray

Registered User.
Local time
Today, 15:12
Joined
Apr 5, 2010
Messages
1,046
The user can navigate to any record, add/change data without any issues. Unfortunately the user is very busy and hard to find any time to do any diagnostics. Fortunately this macro is not critical to the use of the database. I could, if the user requests, to add (either by macro or go into the table) the data the macro would do. I will update if and when I find out more information.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:12
Joined
Feb 28, 2001
Messages
27,167
Essentially, then, the problem is not a catastrophic failure of basic functionality, but a problem with something specific. If you had more than one macro, it would be nice to know if any other macros run besides your miscreant. However, I understand that taking the time to debug a "live" project can be difficult at best and horrendous at worst.
 

kevlray

Registered User.
Local time
Today, 15:12
Joined
Apr 5, 2010
Messages
1,046
It is tempting to throw in another macro (a do nothing macro) on a test form. But then I have to get on the user's machine and see if that one works (part of the issue, user has little spare time for this).
 

Users who are viewing this thread

Top Bottom