Define unit of measure (kg) in calculated field
Solved
esylvestre
Posted messages
11
Status
Member
-
esylvestre Posted messages 11 Status Member -
esylvestre Posted messages 11 Status Member -
Hello,
I’m building a database in Access 2010 based on a model I had in Excel. I think my question is quite simple. In my form, I’d like the units of measure attached to my calculated field to appear to the right of the number in my field. Example: the calculated value = 450, I want to see 450 kg.
It’s that simple in Excel, and in Access it’s easy for monetary or percentage data… is there a VBA program for that?
Configuration: Windows 7 / Internet Explorer 9.0
I’m building a database in Access 2010 based on a model I had in Excel. I think my question is quite simple. In my form, I’d like the units of measure attached to my calculated field to appear to the right of the number in my field. Example: the calculated value = 450, I want to see 450 kg.
It’s that simple in Excel, and in Access it’s easy for monetary or percentage data… is there a VBA program for that?
Configuration: Windows 7 / Internet Explorer 9.0
3 answers
-
Hello
In table creation mode, in the properties
Input mask you put 000000"Kg"
But at input you will need to fill all the spaces.
for 125Kg
You will need to enter 000125
Put it as Numeric if this field will be used for future calculations -
Good evening,
Not sure if that’s a very good idea. Nevertheless, 2 suggestions:
If your control is used to capture your data, you must forbid entering "450 kg", it will be text and you won’t be able to do anything with it. The solution would then be to place a label behind your control with "kg". Thus you will be able to read: "ControlLabel: 450 : kg" The two italicized-underlined parts are labels, the bold part is the field value.
If your control is only for reading, you just need to add a concatenated field in your source query: [FieldToDisplay] = [CalculatedField] & " kg"
Good continuation -