Ask Experts Questions for FREE Help !
    linkinfinity's Avatar
    linkinfinity Posts: 1, Reputation: 1
    New Member

    Apr 10, 2008, 08:10 PM
    Want Button on Access Form for Inserting OLE Object into Table

    I'm looking for a simple simple simple solution that will allow me to add a button to an Access form. When the button is clicked, a File Dialog box should appear allowing me to pick any file to insert into the OLE package.

    I've searched every corner of the web and have found a lot of suggestions that are close, but most are either too complex (using API) or are focused on something specific (like inserting .xls files only).

    Can anyone help?

    Much appreciated!
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man

    Apr 11, 2008, 05:54 AM
    The answer is using the API. Sorry, but there is no simple way. If you use the Code here:
    API: Call the standard Windows File Open/Save dialog box

    You can do this (its what I use). Its not that difficult. The code behind your button would look like this:

    strInputFileName = ahtCommonFileOpenSave(InitialDir:="K:\Transcar", _
    Filter:=strFilter, OpenFile:=True, Flags:=ahtOFN_HIDEREADONLY, _
    DialogTitle:="Select File for Input...")

    This opens the File>Open dialog to the folder K:\Transcar. You can leave out the Filter argument if you want to show all files.

Not your question? Ask your question View similar questions


Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.

Check out some similar questions!

Which table to create main form [ 3 Answers ]

I have created the following tables per a response from Scottgem at to another user asking about creating a Access Database for a survey. My database has 26 questions with answers range being not very true to verry true with a couple simple yes no answers. Where I am stumped is how to display...

Access loads a bitmap into a OLE object as a package [ 2 Answers ]

My client has 3 aging Access 97 dbs that run the production floor of a large plastic manufacturing plant. These are in the process of being replaced by much more robust, professional grade manufacturing control systems. The client is investing millions in the new systems, so redesign at this point...

Bitmap into ole object field in MS Access [ 3 Answers ]

I have an Access 2000 database table with an OLE object field, into which I insert a bitmap image. (This is an existing database whose design I am not authorized to change). When I do this on the system in my office, everything is fine. The image is properly displayed on the form. However, when I...

View more questions Search