What is an Automation object?

G

Guest

I'm getting an error message that says, "The object doesn't contain the
Automation object 'Content standard.'" It goes on to say, "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
operators. Check the component's documentation for information on the
properties and methods it makes available for Automation operators."

Unfortunately, this is all greek to me. I can't find what an Automation
object is, and I don't know what component it's talking about. Obviously I"m
trying to do something that's not allowed, but I don't have enough knowledge
to even find out what I'm not supposed to be doing.
-rg
 
D

Douglas J Steele

Automation usually refers to using objects from another application inside
your application. For example, you can use Automation from within Access to
work with a Word document or an Excel spreadsheet.

What are you trying to do in your code? Post the relevant code, and indicate
where the error is occurring, and someone will probably be able to help you.
 
G

Guest

Thanks for the information.
I am trying to set the value of one field in a record based on the value of
two other fields in the same record. I created a macro that has one action -
SetValue. The Item is [Content standard]![ID], and Expression is [Content
standard]![Strand ID] & "." & [Content standard]![Standard #]. I don't
understand why Access thinks that my table name is an Automation object.
There must be a better way to accomplish what I'm trying to do, any one with
ideas? Thanks,
rg
 
D

Douglas J Steele

There's no reason to store that computed value in your table. As fellow MVP
John Vinson likes to say "Storing derived data such as this in your table
accomplishes three things: it wastes disk space; it wastes time (almost any
calculation will be MUCH faster than a disk fetch); and most importantly, it
risks data corruption. If one of the underlying fields is subsequently
edited, you will have data in your table WHICH IS WRONG, and no automatic
way to detect that fact."

Create a query with a computed field in it that concatenates the two fields.
Use the query wherever you would otherwise use the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rg said:
Thanks for the information.
I am trying to set the value of one field in a record based on the value of
two other fields in the same record. I created a macro that has one action -
SetValue. The Item is [Content standard]![ID], and Expression is [Content
standard]![Strand ID] & "." & [Content standard]![Standard #]. I don't
understand why Access thinks that my table name is an Automation object.
There must be a better way to accomplish what I'm trying to do, any one with
ideas? Thanks,
rg

Douglas J Steele said:
Automation usually refers to using objects from another application inside
your application. For example, you can use Automation from within Access to
work with a Word document or an Excel spreadsheet.

What are you trying to do in your code? Post the relevant code, and indicate
where the error is occurring, and someone will probably be able to help you.
 
G

Guest

That's cool., I had found another message you wrote to someone else saying
basically the same thing. The field had been used as a unique key and your
other post said not to store the data, but to use more than one field for
primary key, which is what I have now done. Thanks for your help, it's
really appreciated.
-rg

Douglas J Steele said:
There's no reason to store that computed value in your table. As fellow MVP
John Vinson likes to say "Storing derived data such as this in your table
accomplishes three things: it wastes disk space; it wastes time (almost any
calculation will be MUCH faster than a disk fetch); and most importantly, it
risks data corruption. If one of the underlying fields is subsequently
edited, you will have data in your table WHICH IS WRONG, and no automatic
way to detect that fact."

Create a query with a computed field in it that concatenates the two fields.
Use the query wherever you would otherwise use the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rg said:
Thanks for the information.
I am trying to set the value of one field in a record based on the value of
two other fields in the same record. I created a macro that has one action -
SetValue. The Item is [Content standard]![ID], and Expression is [Content
standard]![Strand ID] & "." & [Content standard]![Standard #]. I don't
understand why Access thinks that my table name is an Automation object.
There must be a better way to accomplish what I'm trying to do, any one with
ideas? Thanks,
rg

Douglas J Steele said:
Automation usually refers to using objects from another application inside
your application. For example, you can use Automation from within Access to
work with a Word document or an Excel spreadsheet.

What are you trying to do in your code? Post the relevant code, and indicate
where the error is occurring, and someone will probably be able to help you.
 

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