OLE OBJECT HELP

G

Guest

Hello. I'm having two problems with OLE objects. First, I have users
inserting an object into an ole object field, but I'm having some trouble
with a SQL command. I want to run a sql statement to insert this object into
a field elsewhere, but I can't seem to get it right.

The other question I have is related to opening and viewing the object. I
want to assing a button to do this, but I can't seem to get this right either
(in a simple way anyway). Can anyone help me with this? Thanks.
 
D

Dave F

Hello Dan -

I've been playing with automation lately, so I know what you're talking
about.

Unlike other fields in your table, you can't do a direct SQL statement to
insert an object. Instead, you use the Action property of a bound OLE frame
to create an embedded or linked object.

Make sure the control's "OLETypeAllowed" property is set to acOLEEmbedded
(if you want an embedded object) or acOLELinked (if you want a linked
object), or acOLEEither for either of the 2. You can then set the
"SourceDoc" to the name of the file, then set the Action property to
"acCreateEmbed" or "acCreateLink" to add the item to your table.

The documentation on the bound OLE container is pretty good.

hope this helps -

Dave
 

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