I have written a simple piece of code using DLookup to find a value in a query, but keeps getting above error. I have used it with text in the passed (slightly different code) where it worked fine.
Code is used in a After update expression in a combobox:
Basically all is updated as "numbers" as data type. In my regional settings the comma is used as a decimal separator.
If I select any value in the combobox (e.g. '0,42'), I get this error:
I tried to change above code, so it says "0.42" (using a dot, not comma). Then it works for some reason. However all data in the table, which the query is based on use comma's.
Can anyone tell me what to do?
Code is used in a After update expression in a combobox:
Code:
Me.txtUllageVolume = Nz(DLookup("M3", "qryUllage", "Ullage=" & Me.cboUllage))
Basically all is updated as "numbers" as data type. In my regional settings the comma is used as a decimal separator.
If I select any value in the combobox (e.g. '0,42'), I get this error:
Code:
Run-time error '3075':
Syntax error (comma) in query expression 'Ullage=0,42'.
I tried to change above code, so it says "0.42" (using a dot, not comma). Then it works for some reason. However all data in the table, which the query is based on use comma's.
Can anyone tell me what to do?