composition new field in query. I note that Richard always uses a comma , in the composition. I live in Belgium and I always have to use a semicolon ; or I keep getting error messages. Does this have anything to do with an institution or something..... SalesTax: IIf([ProductIsTAxable];Round([ExtPrice2]*[SalesTaxRate];2);0)
Scott Axton
@Reply 3 years ago
More than likely it has to do with the Windows regional settings that are set for your computer due to being in a different country than the USA.
Since you have found that the semicolon works for you, I would continue to use that wherever you see the comma.
Kevin Yip
@Reply 3 years ago
Windows 10 region settings are found in Start -> Settings -> Time & Language -> Region -> Related Settings: Additional date, time, and regional settings -> Region: Change date, time, or number formats -> Additional settings. Next to "List separator" is a comma for the US, and semi-colon for your country.
Ludwig WillemsOP
@Reply 3 years ago
Ok, still weird that it's only with the period comma ; when I write code in a query, with SQL in the properties, or in VBA, a comma does work.
Kevin Yip
@Reply 3 years ago
SQL statements are a special case, as their syntax uses only US rules. For instance, dates use the US date format of mm/dd/yyyy inside an SQL statement. If you try to use dd/mm/yyyy inside an SQL statement, Access will auto-convert it to mm/dd/yyyy if the month and day are unambiguous, like #31/12/2023# or #8-Sep-2023#. If it's something like #8/9/2023#, Access will only see it as August 9th.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 9.