Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011

    Unanswered: lookup files thorugh comouter?

    how do i create a viewable picture field next to a persons details on a form?

    and also, how do i make this picture field look up a file through the computer to use as its picture source?


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    store a URL to the resource/picture in a column in the table
    then insert a image control on your form
    then either set that controls source to the column containignthe URL
    set the image manually
    create an image wich displays some text such 'as image not found', sotre it int he same directory as the access application

    create a function called say setImage
    private sub setImage(URL as string)
    if FileExists(URL) then
      myimagecontrol.picture = url
      myimagecontrol.picture = <path to 'image not found# image>
    add the code fromt he specified link to your form ort a code module

    then call that sub in the forms on current event
    the myimagecontrols 'on lost focus', 'on change' events, 'on befire update' events
    change the names of the column (myImageControl) and the image control (myImageControl) to whatever you've called them in your db

    although just setting the image control to the column is by far the easiest, using the code allows you to gracefully handle where the image is invalid (either corrupt or missing [ie someone has deleted the file]or not set)
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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