Jean-Marc Flamand
Jean-Marc Flamand

Reputation: 989

Display specific number of decimal base on value on a form

I have a form that display values btwn .000001 to 50,000.000000 in a text box control.

I would like to display rounded number according to a range of value in the control source properties. Is it possible?

I try this simple example:

IIf( [unit_weight]>=100, Round([unit_weight],1),[unit_weight])

and I did get the following message

enter image description here

Upvotes: 0

Views: 25

Answers (1)

Erik A
Erik A

Reputation: 32682

The error you receive is because you're using a , to separate arguments in an expression, while you should be using the list separator, as defined in your locale settings.

You can change your list separator by going to the control panel, then Region, then Additional settings ... , then List separator.

The usual list separator in England and the US is a comma, if it's not a comma it's usually a semicolon

Note that in VBA and SQL, you always use a comma to separate arguments, while in expressions, it's dependent on your locale settings

Upvotes: 1

Related Questions