Disable Control

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

I'm trying to set a control's Enabled property to False
when a certain condition is met. The problem I'm having is
refering to the control's Control Source Name in the code.
In this case, the control's name is "Name".

I can't come up with the proper syntax that will allow the
editor to select the Enabled property.
 
Richard said:
I'm trying to set a control's Enabled property to False
when a certain condition is met. The problem I'm having is
refering to the control's Control Source Name in the code.
In this case, the control's name is "Name".

I can't come up with the proper syntax that will allow the
editor to select the Enabled property.


What code are you currently using? Or are you using
Conditional Formatting?

Please note that naming items (Fields, Controls and VBA
variables) the same as Access reserved words will cause
confusion to both you and to Access. Your problem may(?) be
caused by this ambiguity.

Also, don't get mixed up over the name of a field vs the
name of the control that displays the field's value. These
are very different objects. If the names are the same,
there are some cases where this particular ambiguity can
cause the control to display #Error.

Please provide more details about your situation and maybe
someone will be able to help you out.
 
Thanks, renaming the control worked wonders.

Good point on not naming things with reserved keywords. I
wished the person who originally developed this database
had followed the same procedure.
 
Marsh,

Thanks for the info. As you'll see in my previous reply to
the other poster, I did solve my problem by renaming the
control. Thanks for the clarification that a field name
and a control name can be named separately.

Richard
 
Back
Top