Share via

MS Access: WEIRD errors on query functions

Anonymous
2023-04-19T10:11:50+00:00

In the past few days, MS Access has suddenly started raising syntax errors, etc. whenever I use any formula that includes a number. For example: an InStr function (start value is a number), or an IIf statement where the condition resolves to a numeric value. These are the same functions I've used almost daily for YEARS, and suddenly I'm getting errors that just don't make any sense. I literally had to wrap an if statement's condition in a CStr to get the IIf statement to work. Has anyone else seen anything like this, and if so, how did you resolve it? Any help would be appreciated - it's literally driving me to pop and Pringles.

Microsoft 365 and Office | Access | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2023-04-20T04:00:59+00:00

    This sounds very much like a References problem. Alt+F11 to open VBA > Tools > References.

    Was this answer helpful?

    0 comments No comments
  2. George Hepworth 22,855 Reputation points Volunteer Moderator
    2023-04-19T13:07:32+00:00

    Can we see some details? Sample data displaying the problem and the SQL of a query where this expression is used? We have a hard time diagnosing specific problems from generic descriptions.

    What version of Access do you have installed?

    Was this answer helpful?

    0 comments No comments