By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,046 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,046 IT Pros & Developers. It's quick & easy.

Access 2019 Query runs fine for a while then suddenly - changes , to .

P: 7
Using basic Access tools - I developed a small system using Access 2013 - it ran fine

Took it to a client who is running Access 2019 (365) - imported from my system some queries and forms

All worked well

Tries to edit a form on their system - suddenly the query had an error Invalid use of '.'etc.

Had two other unrelated queries - both work fine - tried to run them again 5 minutes later - came up with same error

The only thing I can think of is that there is a problem running it on their network.

Once the client mentioned that she couldn't save - but it eventually did

Any ideas - I cannot fathom this out
How can it work fine and 5 minutes later bomb out

Update - in the query it changes from , to . - anyone know how to stop this or why its happening

Attached Images
File Type: jpg Access error.JPG (22.2 KB, 165 views)
4 Weeks Ago #1
Share this Question
Share on Google+
2 Replies

Expert Mod 15k+
P: 31,473
You give many examples but very little detail of anything. Just looking at the error message - what changes, from what, to what?
4 Weeks Ago #2

Expert Mod 2.5K+
P: 3,282

If Itake a quick look at your error message, I can see that your IIf() Statement is total garbage (not saying you intended it that way or or that you designed it that way). However, there is absolutely no way that that query ever worked if it was written the way it is displayed:

Expand|Select|Wrap|Line Numbers
  1. IIf([CostPrice/m3]=True.[Quantity m3]*[Cost Prices]![CostPrice/m3].0
First, the IIF() Statement needs three arguments: the first is to be evaluated as either true or false, the Second is the result if the condition evaluated is true, the third the result if false. These are separated by commas. You only have one argument (which does not even have a closing parentheses), and you apparently have dots between your arguments instead of commas.

Second, you are using a Field Name (apparently) that has a slash ("/") in the name? All I can say is that I am surprised Access even allowed that, because that is an operator, not a valid character for a name. This is a bad idea. No--this is a terrible idea.

Finally, although Access does allow you to use references to Forms and the controls on those forms, it is always wiser (whenever possible) to have your VBA create a query that resolves the references to actual values.

So, from my perspective--it is perfectly clear why your query broke. I'm just not sure how the query ever worked if it is written as displayed. If it was written in a way that actually worked, then I am totally dumbfounded as to why such a dramatic change would have occured on a newer system.

Hope this hepps!
4 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.