Results 1 to 12 of 12

Thread: Picture Viewer

  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Picture Viewer

    Hi all I have an ADP which had a form that I put pictures in for the viewers to look at. It was basically a picture table that was linked to the master table so viewers can see employee pictues. But since we upgraded to Microsoft Office 2003 I cant see the picutes anymore just the file number.jpg and thats it, but when I had Microsoft 2000 I didnt have that problem. Can anyone help please this is driving me crazy and I need to get it resolved ASAP\

    Thank you

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    how's the picture being used on the form, or should I say, how is it being updated? Can you do something like the following on the OnCurrent event?

    Code:
    Dim strFilePath As String
    strFilePath = "c:\folder\" & Me.TxtBoxName & ".jpg"
    Me.ctlPicture.Picture = strFilePath
    Me.Geek = True

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    How its used

    its just a form that I insert pictures (jpg) into for the users to see. its pictures of employees so if they look up an employee number not only do they see their data but their picute.

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    How is the data stored? Do you store the whole file location (eg, "C:\folder\picture.jpg"), or just the name of the picture file (eg, "picture.jpg")? It is the later, do you store all of them in a single folder?
    Me.Geek = True

  5. #5
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    single folder

    all of them are stored in a single folder

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by desireemm
    its just a form that I insert pictures (jpg) into for the users to see. its pictures of employees so if they look up an employee number not only do they see their data but their picute.
    Fancy elaborating what method you use to "insert" pictures?
    oh yeah... documentation... I have heard of that.

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

  7. #7
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    I just insert

    I right click on the bound object field and go to insert object on the submenu just like in the picture
    Last edited by desireemm; 04-15-09 at 17:23.

  8. #8
    Join Date
    May 2005
    Posts
    1,191
    Generally, I do not like to store OLE objects in the dB. I do a similar thing in a dB of mine, but I store the file location as a string in the table. Then, on the OnCurrent event, I use the code I posted earlier. Give this a try.
    Me.Geek = True

  9. #9
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    can you elaborate

    what do you mean you but I store the file location as a string in the table.

  10. #10
    Join Date
    May 2005
    Posts
    1,191
    Check out the attached dB. Just unzip everything to some folder somewhere, and check out the only dB form.

    EDIT: The only thing I do differently with mine is that I store all the pictures in a subfolder with the dB, then I name all the pictures with the ID# of each person. So when I need to update the picture, I just formulate where the file should be, do a check, and load it. That way you don't actually have to store anything for the file location.
    Attached Files Attached Files
    Last edited by nckdryr; 06-13-07 at 18:19.
    Me.Geek = True

  11. #11
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    ok I see your point

    now my question is how do I add to the code the fact that the pictures are located in a folder on the server with the ADP


    \\gcsql\Database\Backgrounds\EmployeePictures

  12. #12
    Join Date
    May 2005
    Posts
    1,191
    in the dB, i just used application.currentdb.path (i think off the top of my head) to make sure it would find the pictures in the same folder as you put the dB (as I would have NO idea where you would choose to put it). You can replace this with a string indicating your folder (if it is constant).
    Me.Geek = True

Posting Permissions

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