OLE question

W

WBullock

I have some OLE fields on forms in my database. I want to programatically
click a button and automatically go to the Open dialog box instead of having
to click on create from file then click on browse. All I want to do is
bypass these first two steps
 
J

Jon Furman

The short answer, at least the one that comes to my mind, is to use the
office file picker object to prompt the user to choose the file and then
manipulate the controls property in VBA to update the OLE data. Here's a
code snippet of something I did that probably similar to what you're trying:

Let Me.OLEFile.Locked = False
Let Me.OLEFile.Enabled = True
DoEvents
Let Me.OLEFile.SourceDoc = Me.FullPath
Let [OLEFile].OLETypeAllowed = acOLELinked
Let [OLEFile].Action = acOLECreateLink
Call Me.cmdDelete.SetFocus
Let Me.OLEFile.Locked = True
Let Me.OLEFile.Enabled = False


Hope that helps.


Jon
 
W

WBullock

I am not very good at vba so I think I am missing something. I get an error
message that say's Method or data member not found.

How do I fix this?
 

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