I need help omitting a field from a report upon selecting a macro, using an expression or code.
Report has a record source and the user may not require the filed sometimes. so I would like to have the field not displayed in the report through selecting a command.
The field is a 'Fee' field and the cost gets added to the totals column.
Summary,
On selecting the comman button,
Fee field should not be visible or become 0 and totals column should subtract the value.
I have tried using the set value macro to set a value for that field but its not working out.
I have alse tried coding the filed to not be visible and the the totals column to update the loss of that value. the code is as follows:
Please help
Report has a record source and the user may not require the filed sometimes. so I would like to have the field not displayed in the report through selecting a command.
The field is a 'Fee' field and the cost gets added to the totals column.
Summary,
On selecting the comman button,
Fee field should not be visible or become 0 and totals column should subtract the value.
I have tried using the set value macro to set a value for that field but its not working out.
I have alse tried coding the filed to not be visible and the the totals column to update the loss of that value. the code is as follows:
Code:
Primary sub CmdSmallEntity_Click()
Set me.SmallEntity.Value.visible= false
if me.SmallEntity.value.visible = false then
me.TotalCosts.Value = me.TotalCostsValue - me.SmallEntity.value
end if
end sub