Results 1 to 3 of 3
  1. #1
    s_hannah is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    2

    Access 2010, show images on form

    Hi,
    I am hoping soeone can help. I am using the following code to show an image on the form, based on the value of the textbox. However the problem is that it only shows the first records image and doesnt change to the next, I have added the code the the onload event and the next button event but no joy,

    Code:
    strPath = "C:\Images\" & txtImage.Value & ".jpg"
    imgPicture.Picture = strPath
    If anyone has a solution, I would be so greatful!



    Kindest Regards,
    Stuart

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Try the OnCurrent event of the form.

    Might event help to use qualifier prefix:

    strPath = "C:\Images\" & Me.txtImage & ".jpg"
    Me.imgPicture.Picture = strPath

    Are you using an Image control? Instead of .Picture, could try the ControlSource property instead.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    s_hannah is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    2

    Thumbs up Solved

    Thanks for your help, I have looked into ControlSource and it has worked perfectly.

    Thanks

    Stuart

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 02-18-2012, 07:20 AM
  2. Access 2010 - Images on Forms
    By dluhop in forum Forms
    Replies: 23
    Last Post: 10-05-2011, 08:51 AM
  3. Replies: 9
    Last Post: 08-07-2011, 11:21 AM
  4. Linking to Images in Access using VBA
    By Obeng in forum Access
    Replies: 1
    Last Post: 10-30-2010, 05:39 PM
  5. Replies: 17
    Last Post: 08-26-2009, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums