Results 1 to 6 of 6

Thread: Select file

  1. #1
    Join Date
    Oct 2005
    Posts
    12

    Unanswered: Select file

    OK, so here's the deal. In attempting to make my database as non-bloated as possible, I'm linking to external photos. The locations of these photos are in a field we'll call [photofile]. Now I would love to have an "open file" type diologue box pop up to be able to select the file in question and when i click on "open" have it export that file path to the [photofile] field so that when I then clilck on "show photo" or something of the sort I can have [photofile] become me.image.picture, thus displaying the lovely shot, but also storing it for the next time so all i have to do is click "show photo" without finding the picture again.

    So the big question is: how do I get to the open file diologue and how do i paste what it returns into [photofile]? i'm using access 2002 (or xp if you want the branding) if that helps.

    ps. this board rocks. so far i've gotten so many great ideas off here. keep it real and thanks.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Have a look at the FileDialog Object in the help file. There is a pretty good example of how to use it there.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why use a open file dialog?

    add an image control to a form

    change the image control properties to point to the URL to the image

    eg
    <myImageControl>.Picture = <pathtoimage>

  4. #4
    Join Date
    Aug 2004
    Posts
    178

  5. #5
    Join Date
    Oct 2005
    Posts
    12

    Clarification...

    Wow, you guys rock. I've got the images loading, that's all fine and good. If there's a photo associated with that entry, it loads just fine and if there's not, then there's a standard little "Photo not found" thing that displays. So far so good here's what I'm trying to do...
    We're adding new entries into the database weekly, and typing in all the info longhand is a bit tedious for me and, since i'm not actually the end user that will be working with this in about 8 months time, i want to make it even simpler. The best way I can come up with making this simpler is to give the user an "open file" diologe box that will load the file path into a text box, where it can then be used as a reference to load the picture (the me.photo1.picture = me.txtbox method). Now, the help file from microsoft on how to handle this has an (overly generous) score of 3/10. The first article that was given through the link from mega1 was in german or something and my little program keeps giving me error upon error with that one (ambiguous names mostly). The second link is actually the picture thing which i already had working, but thanks for the research! I'm going to keep trying to figure out the german thing, but if anyone else has other ideas...

  6. #6
    Join Date
    Oct 2005
    Posts
    12
    Rule of thumb: as soon as you post, you figure it out. Got it. Thanks, all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •