Results 1 to 2 of 2
  1. #1
    Jax is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    1

    Displaying an image based on a textbox criteria query

    Hello,

    i'm pretty much a beginner and I find myself having trouble reaching my objective. I've made a simple table for now listing my movies with Title, Year, Cover(attachment) for fields. I have one query whom's criteria is Title, so Query by Title. I've made a simplistic form with a textbox which will be used for the title criteria, a button to run the query, and an embedded image box =[Movies]![Cover].

    The goal is to type in the title, search, and the form itself be updated with the cover image rather then opening a datasheet. At this point, I can type in a title, search, and the query runs returning the correct results in a datasheet, minus the cover of course, but the image on the form never updates. I've come to realize i'm going about this the wrong way atleast for what I want to achieve, so I'd like to ask for some help heading toward the right direction. It may be worth noting I am not concerned with attaching images as the database will be rather small. Also, I am no vba / sql guru, but I am comfortable with general syntax overall from my experiences with c++.

    To recap, the goal is to search a title via textbox, the form the textbox is on will update showing the cover image. I'd also like to apologize if i've missed this exact topic out there, I did look, but had a hard time finding something this specific. Thank you for your time.

    For reference...
    Table -> Movies


    Fields -> Title, Year, Cover (Attachment)
    Forms -> searcht (Textbox, button, embedded image)
    Query -> Title Criteria (using Like "*" & [Forms]![searcht]![Text0] & "*")

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Build search function on the form. Review this for one method - very little code involved: http://datapigtechnologies.com/flash...tomfilter.html

    BTW, the ControlSource for the Image control should simply be: [Cover]
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2011, 02:46 PM
  2. Displaying image in calculated field
    By ceci123 in forum Access
    Replies: 2
    Last Post: 01-25-2011, 11:51 AM
  3. Replies: 9
    Last Post: 01-21-2011, 03:57 PM
  4. Filename displaying with image
    By Rob Parker in forum Forms
    Replies: 2
    Last Post: 01-13-2010, 05:05 PM
  5. Error displaying image on form
    By mamba716 in forum Forms
    Replies: 6
    Last Post: 06-17-2009, 09:13 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