Forum Discussion
vinodnair
Aug 15, 2024Copper Contributor
Kindly help me write an expression in my MS ACCESS report
I have following fields in the report 'Item quantity required per piece' bound field- number field : Field name in the report is [QUANTITY REQUIRED] 'unit'- text filed- bound field: (Unit can be 'G...
Ken_Sheridan
Aug 28, 2024Brass Contributor
You appear to have use an ampersand rather than the Boolean AND operator. If you are assigning a value to the Text371 control in code try this as the ControlSource property of the Text371 control:
=IFF [Text45]*[QUANITY RQUIRED]>1000 AND [QUANTITY UNIT]="GM", [Text45]*[QUANITY RQUIRED]/1000 & " KG",[Text45]*[QUANTITY REQUIRED] & " " & [Units]
Or if [Text371] is a bound control and you are assigning the value to the control in code Try this:
[Text371] = IFF [Text45]*[QUANITY RQUIRED]>1000 AND [QUANTITY UNIT]="GM", [Text45]*[QUANITY RQUIRED]/1000 & " KG",[Text45]*[QUANTITY REQUIRED] & " " & [Units]