Simple Syntax Question

G

Greg Smith

I am creating a report in Access and I would like alter the visibility of
certain controls based on a value in a data field. I have tried writing the
code but there is no code filler for the property I want to change.

This is basically what I am trying to do.

If the data field "OrderViaFax" contains a true (it is a Boolean field) then
make the corresponding label visible "OrderViaFax_label". There is a
visible property that can be changed at design time but I can't seem to find
the way to change it at run-time.

Any help is greatly appreciated.
 
T

Tom Lake

If the data field "OrderViaFax" contains a true (it is a Boolean field)
then
make the corresponding label visible "OrderViaFax_label". There is a
visible property that can be changed at design time but I can't seem to find
the way to change it at run-time.

OrderViaFax_label.Visible = True

There's a period between label and Visible.

Tom Lake
 
G

Greg Smith

Thanks for the help.

I should have tried that but the fact the property was not on the drop down
list put me off.

Could I throw out one me question?

I am trying to change the visibility based on the value on a Boolean field
on the report.

Something like:

if OrderViaFax_label.Value = true then
OrderViaFax_label.Visible = True
end if

This bombs out on me.
 
F

fredg

I am creating a report in Access and I would like alter the visibility of
certain controls based on a value in a data field. I have tried writing the
code but there is no code filler for the property I want to change.

This is basically what I am trying to do.

If the data field "OrderViaFax" contains a true (it is a Boolean field) then
make the corresponding label visible "OrderViaFax_label". There is a
visible property that can be changed at design time but I can't seem to find
the way to change it at run-time.

Any help is greatly appreciated.

Let's keep it simple:
OrderViaFax_Label.Visible = OrderViaFax
 
Top