Solved Using a single precision field as condition

XPS35

Active member
Local time
Today, 22:46
Joined
Jul 19, 2022
Messages
212
I use the Dutch versions of Access and Windows. That means that the decimal separator is set to a comma by default.
In a table I have a numeric field (single precision). Entering and displaying values works fine for this field.
However, if I use the field as a condition in a function, I get an error. For example, the following function returns an error:
Code:
MsgBox DSum("ItemValue", "MyTable", "ItemValue <= " & Me.ItemValue)
The error is:
enkeleprecisie.jpg

[syntax error (comma) in query expression ....]

How do I modify the code to get a good result?
 
The criteria in DSum expects an SQL filter, in English with US formats. Therefore, the comma must be treated.
Code:
MsgBox DSum("ItemValue", "MyTable", "ItemValue <= " & Str(Me.ItemValue))
 
Thanks, that works.
 

Users who are viewing this thread

Back
Top Bottom