Simple Syntax Question

  • Thread starter Thread starter Greg Smith
  • Start date Start date
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.
 
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
 
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.
 
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
 
The more Access VBA programming you do, the more odd deficiencies you
find in "autocomplete". If you think a property or function should be
accessible, enter it manually all in lower case - if it is, the
capitalisation will be corrected when you move to the next line.

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.

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top