End user selected images

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Not sure where to post this, it's kind of a two-part question/request.

I would like to know if there is an ideal way for an end user to be able to
select an image from there pc and add it to a form (which will also show up
on a related report) in Access 97.

I've been able to do this to some extent using a bound object frame. the
autosizing on the form that I found from Lebans works ok
(A97AutosizeOLEVer6.mdb) for this part.

I'm running into problems on the actual report, where sizing becomes an
issue. the problem is that I need to create a rather large Object frame in
order to accomodate a reasonably sized image. As well as notify the user on
the forms end to not exceed the largest size accomodated by the frame. The
other problem is that if the image is rather small, there is a large area of
"White space" due to the reserved area by the frame (wasted space). Also if
there is more than one Small image, they each take up a whole page (close to
it anyways)

Ideally, for the Form:
I would like a simple text box and a button eg. "Browse for Image..."
similar to selecting an attachment for email using webmail, or for uploading
an image on some sites (no preview, just the name of the image in the text
box once the file is selected). I would like this button to actually have the
ability to allow a person to browse there computer once it is pressed - if
possible.

Ideally, for the report:
It would be nice if the image would appear as it's "actual size" with no
wasted space (this would be nice if there happened to be more than one image,
- they'd show up on the same page instead of each one having it's own page).

I don't know if Access 97 is even capable of coming close to what is ideal,
but it would sure be nice.

Does anyone have any suggestions?
Also if this is way out of my league, could someone be kind enough to tell me?

I would appreciate the help either way. thanks in advance.
 
Kim, did you receive any answer to this request? All I need is an answer to
your first question: a browse for image file and the name of the image put in
the field.

thanks much
 
Thanks for the reply, Doug (and appreciate your beer and wine making tips on
your website..I am a beginner at that as well)

Sorry to have to ask you to hand hold. I am really new: I visited that api
page and it looks like what I need. Do I paste that code after the "** Code
Start *" into a module of any name? Then how do I test that code? (How do I
make it work with the form?)
Thanks much
 
Take everything between Code Start and Code End and copy it into a new
module. When you save the module, make sure you don't name it the same as
any of the routines inside the module.

To use it, use code like the same at the top of the webpage I cited, or look
at the function TestIt or GetOpenFile in the code you copied in the module.
 
OK. I created the module and pasted the code from the top of the cited
webpage into the 'on click' event for a button that I placed on the form.
When user clicks the button the browse dialog box comes up and they can find
the image (changed the code so the browse dialog box shows JPG Files instead
of xls files).

Now...I just need the name of the file they 'open' to appear in a text box
on the form. How can that be done?

Thanks a lot.
 
Back
Top