"The expression On Timer..." error being produced only for 1 user (1 Viewer)

whyamIdoingthis

New member
Local time
Tomorrow, 06:22
Joined
Jul 29, 2021
Messages
5
Hello good people of the internet!

Disclaimer: I have tried to post this in the most appropriate place but if I got it wrong please, Mods, let me know and I will move/delete/repost/correct.

This error is being produced for one of our database users.
1627523535223.png


I would normally assess the form producing this error for the cause but it seems that only one in a group of people are affected. Everyone else is using the form without the error being produced.
Does anyone have any possible explanations for this?

Details:
MS Access Version: In Microsoft 365 apps for enterprise 2102 (Build 13801.20808)
Environment: Windows 10
Number of users: 24
Number affected: 1
  • The front end is located on each users machine.
  • The backend is located on a network drive.
  • Every user is using exactly the same version/copy of the front end.
  • All users are using the same hardware. (Software and OS is managed centrally).
  • Library references (specific references and order of references) are aligned across all users.

If I've missed any details, please let me know and I'll fill in the gaps.
I'm new to the forum and a novice to medium MS Access user.
Many thanks everyone.
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 13:22
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

The next place to check, I think, is to find out if there's anything different about the computer producing the error.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:22
Joined
Feb 28, 2001
Messages
27,183
As the library references list is a registry entry, not a "pure" DB entry, one could imagine a difference in your References from one machine to the next. Compare the references list (INCLUDING the order in which the references were made) on a working and the failing machine.
 

whyamIdoingthis

New member
Local time
Tomorrow, 06:22
Joined
Jul 29, 2021
Messages
5
As the library references list is a registry entry, not a "pure" DB entry, one could imagine a difference in your References from one machine to the next. Compare the references list (INCLUDING the order in which the references were made) on a working and the failing machine.
@theDBguy thank you for the welcome and good point! I should have included that. Post updated.
All users are using the same hardware. Software and OS is managed centrally.

@The_Doc_Man thank you very much. I didn't know the order mattered. I can confirm that all the library references across users are in sync. Post updated.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:22
Joined
May 7, 2009
Messages
19,242
what does the Timer doing?
the error is about Datatype mismatch?
can you post the code?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:22
Joined
Feb 28, 2001
Messages
27,183
By any chance are you declaring the "OnTimer" event programmatically? I looked at that message more closely. It says (I think) that the value loaded to the EventRoutine slot corresponding to OnTimer somehow isn't an address.

I might suggest that you do a compact and repair of the failing copy of the Front End file - or just flat-out replace it with another copy. If you replace the problem FE with a copy of a working FE, then if THAT fails, you know the problem is specific to the machine and not necessarily a database problem.
 

whyamIdoingthis

New member
Local time
Tomorrow, 06:22
Joined
Jul 29, 2021
Messages
5
You are all scholars and gentlemen (gentlepeople? :)) and I thank you for all your replies.
This has been resolved (although the 'solution' is not one that I understand).

@The_Doc_Man I like the way you think. Replacing the users current FE file and aligning it to a master happens every time a user opens the database so, having the user close and reopen, we knew their FE file was 'fresh'. This obviously made the generation of the error all the more mysterious as well as what ended up being the solution. Also I did not know that front ends could/should be compacted. Thank you for that. Perhaps I should consider doing that to the FE master, (although as a rule we do not place tables in the front end).

Cause and Fix
The form that was producing an error has a gate keeper table that lists the users that have permission to use the form.
The affected user appeared in the table but their userid was misspelt.
Any user with a userid not found in the permissions table should have produced a message box defined in the vba behind the form.
Therefore, why the "OnTimer" error was being produced and not the msgbox is still a mystery to me.
In any case, correcting the users userid in the permissions table seems to have resolved this.

I doubt this will help anyone else as the setup is bespoke and the solution seemingly random but I post it here to resolve this thread.
Thank you all again for your kind help.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:22
Joined
Oct 29, 2018
Messages
21,473
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:22
Joined
Feb 28, 2001
Messages
27,183
Also I did not know that front ends could/should be compacted.

FE files need compaction (a) if they contain local tables or (b) if the FE is merely a copy of a "master development copy" that hasn't been compacted. Using one as you described - with what we call an "auto-updater" - means you compact a NEW FE after you have made changes and are putting one into production. However, if nobody ever directly runs this AND everybody COPIES this new FE, then you do the C&R exactly ONCE and then leave it alone.

As to the cause of the observed error, note the 2nd reason suggested in the message box reporting the error. If there is some kind of error in the logic path that responds to a "bad USERID" case, you wouldn't see the error for the good userID cases so wouldn't realize it was there. Go back and look at what happens when a user gets rejected and I'll bet you have an error there.

However, I agree with you that the error is a bit unexpected for the circumstances. Wish I could say I've never seen Access give screwy errors before, but if you look at my "Joined" date, you would realize I have probably seen a LOT of things with Access that were somehow screwy.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:22
Joined
May 7, 2009
Messages
19,242
I doubt this will help anyone else as the setup is bespoke and the solution seemingly random but I post it here to resolve this thread.
the Error message is already "suggesting" what to check?
 

Users who are viewing this thread

Top Bottom