Automation object errors

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to modify the "Enabled" or "Visible" properties of a control,
based on whether a field in a related Table contains a value or not.

I am using a conditional macro as follows:

Condition: [TableName]![FieldName] Is Not Null
Action: SetValue
Item: [Forms]![FormName]![ControlName].[Visible]
Expression: Yes

The form's Current event is set to run this macro, yet when it does, I
generate an error message that says"You tried to run a Visual Basic procedure
to set a property or method for an object. However, the component doesn't
make the property or method available for Automation operations."

Can anyone advise as to what might be at work here?
 
Hello Franklin.

Franklin said:
I am trying to modify the "Enabled" or "Visible" properties of a
control, based on whether a field in a related Table contains a
value or not.
I am using a conditional macro as follows:
Condition: [TableName]![FieldName] Is Not Null
Action: SetValue
Item: [Forms]![FormName]![ControlName].[Visible]
Expression: Yes

The form's Current event is set to run this macro, yet when it
does, I generate an error message that says"You tried to run a Visual
Basic procedure to set a property or method for an object.
However, the component doesn't make the property or method available
for Automation operations."

Can anyone advise as to what might be at work here?

Maybe you mixed up ControlName and FieldName. Be sure that you use the
ControlName in the item argument. If both names are equal, try renaming
the control.
 
Thanks for the assistance.

REgards,

Franklin

Wolfgang Kais said:
Hello Franklin.

Franklin said:
I am trying to modify the "Enabled" or "Visible" properties of a
control, based on whether a field in a related Table contains a
value or not.
I am using a conditional macro as follows:
Condition: [TableName]![FieldName] Is Not Null
Action: SetValue
Item: [Forms]![FormName]![ControlName].[Visible]
Expression: Yes

The form's Current event is set to run this macro, yet when it
does, I generate an error message that says"You tried to run a Visual
Basic procedure to set a property or method for an object.
However, the component doesn't make the property or method available
for Automation operations."

Can anyone advise as to what might be at work here?

Maybe you mixed up ControlName and FieldName. Be sure that you use the
ControlName in the item argument. If both names are equal, try renaming
the control.
 
Back
Top