Automation object errors

F

Franklin Smith

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?
 
W

Wolfgang Kais

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.
 
F

Franklin Smith

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top