Need to search for and get the path of a file on the click event of a button...h

  • Thread starter Thread starter Kat
  • Start date Start date
K

Kat

Hi, I need to code and event or macro for a button that
will perform the following:

1. display the MS file open dialog box to a certain
directory with jpg files in it.

2. let the user choose and open a file.

3. store the file name in a variable (and into a database
field).

4. display the image in a picture box on a form.

Can anyone help me out. I've looked at the help and can't
find what i need. Please reply to me via my
(e-mail address removed)

Thanks!!
 
Hmm, I get the following error...

Sub or funciton not defined for ahtAddFilterItem. I'm
using Access 2000. Any ideas why i'm getting that?
Thanks!
 
I'm betting that you tried to use the code at the top of the web page. You
also need all the code in the "blue" box below that, too. The function
ahtAddFilterItem is part of that big piece of code.
 
Yep, you're right. I put all of that code in my clicked
event for the button and get errors. Is that were it
goes? I'm not too familiar with Access and VB...Thanks!
 
The code in the blue box needs to go into a regular module. In the database
window, click on Modules, then click on New. Paste all that code into that
module. Save the module with the name basAPIFileBrowse.

I haven't had a chance to use this code, but others have and say that it
works just great for them.
 
Back
Top