Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open file dialogue to embed a file in an Access record

Status
Not open for further replies.

stephenbaer

Computer
Joined
May 15, 2005
Messages
3
Location
US
First, the scenario...

An Access table with a field data type of "OLE object". You can simulate what I'm trying to do by creating a simple table with a key field and an OLE field, then generating an autoform. This will be a form with a blank bound object frame. To embed a file (a scanned PDF document, for example) the user has to right click the frame, select "insert object", then select "create from file",then browse to the file, then click "OK", then click "link", then "display as icon, then "OK". This is too many steps for the average user. It's just too hard to miss a step, or otherwise screw it up. As anyone with training experience can tell you, most people blank out after about step 4 of any complicated computer operation, especially if they aren't great with computers.

The (hopeful) solution...
Make a form with a command button that does all the extra steps besides browsing and selecting the file/object. Most people can manage to pick the right file when presented with the open file dialogue. The frame can be hidden if it is empty for the current record, thus further simplfying the display.

Does anyone know how to do this?

 
Heh, that took some searching, but I found it buried deep in the help. For anyone interested, Use the [fieldname].Action = acOLEInsertObjDlg as the code for the button. You can specify linked, embedded, or either in the properties box on the bound object form control. I'm still working on the way you automate the "create new" or "create from file" choice. There doesn't seem to be a way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top