Version 2302 Build 16130.20306 bug (1 Viewer)

md79

New member
Local time
Today, 23:16
Joined
Mar 15, 2023
Messages
3
There is a bug with the latest version.

Using DAO - setting DefaultValue with certain non alphanumeric characters fails.

For example this line of code fails.

pclDB.TableDefs("Tenants").Fields("URMulti").DefaultValue = "."

It fails with Error 3320 - Syntax error (missing operator) in table-level validation expression.
 
Last edited:

theDBguy

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

Here's the actual error message I got when I gave it a try. Not sure if that helps.

1678893030709.png
 

sonic8

AWF VIP
Local time
Tomorrow, 00:16
Joined
Oct 27, 2015
Messages
998
For example this line of code fails.

pclDB.TableDefs("Tenants").Fields("URMulti").DefaultValue = "."
I'm afraid the bug is in your code, not in Access.

The correct syntax for setting the default value is:
Code:
pclDB.TableDefs("Tenants").Fields("URMulti").DefaultValue = """."""

The value of DefaultValue is an expression, so any string literals in that property must be enclosed in string delimiters.
With some, non-ambiguous expressions Access also accepts your incorrect syntax omitting the delimiters for a character literal.
 

md79

New member
Local time
Today, 23:16
Joined
Mar 15, 2023
Messages
3
Thanks, that worked.

But it's worth noting that this change is limited to the latest build. This code does not break on other versions and builds.
 

sonic8

AWF VIP
Local time
Tomorrow, 00:16
Joined
Oct 27, 2015
Messages
998
But it's worth noting that this change is limited to the latest build. This code does not break on other versions and builds.
Are you sure? I recommend you double check.
I get the very same error message in Access 2010 already.
I remember getting the same error in similar situations multiple times over the years. I strongly doubt, this worked in any version ever.
 

Josef P.

Well-known member
Local time
Tomorrow, 00:16
Joined
Feb 2, 2023
Messages
827
Just tested (v 2208): via code it was possible to set only the point (without "), with manual change in the table design the " were set.
 

md79

New member
Local time
Today, 23:16
Joined
Mar 15, 2023
Messages
3
Are you sure? I recommend you double check.
I get the very same error message in Access 2010 already.
I remember getting the same error in similar situations multiple times over the years. I strongly doubt, this worked in any version ever.
Yes, we have multiple users installing our latest update, this only failed on the latest build.
 

Users who are viewing this thread

Top Bottom