Pictures not following ComboBox

Posted on 2011-04-18
Last Modified: 2012-05-11
I added pictures to my read-only "View" Form and when it is opened it show the picture of the employee, but on the "Entry" form you can select an employee with a combo box but the picture does not change to match the selection. I've added code to the frmEmergencyContactsEntry afterUpdate to requery but no luck. I'm hoping someone can point me in the right direction.
Private Sub Form_AfterUpdate()
If IsNull(Me!txtPicture) Or Me!txtPicture = "" Then
        ' do nothing
        Me!DisplayPicture.Picture = GetPathPart & Me!txtPicture
    End If

        Me!CboStaffName = "StaffID"
End Sub

Open in new window

Question by:poucedeleon
    LVL 26

    Expert Comment

    read-only "View" Form?
    the "Entry" form?

    Just which one is which?
    And since you posted it secured, just how am I supposed to examine it?
    LVL 26

    Expert Comment


    I held the shift button and got in.
    You got a little mixed up with your navigation buttons.
    On the form with the combo box to select, the main form has nav buttons, and the pictures work.

    The other form, the SUBFORM has the nav buttons, not the main form.
    There is no way to move it to new records, so the picture doesn't change.

    Make the nav buttons the same (on main form) and they work correctly
    LVL 26

    Expert Comment

    Altered sample (opened with Access 2010--references may be broken for prior versions)
    Let me know

    Author Comment

    When you open he db and click on Emergency Contacts, a Entry Form Opens. The last record in the db is displayed with the pic. But if you change record, (Select a diferent employee from the combobox at the top or the record selector at the bottom) the picture does not update.
    LVL 26

    Accepted Solution

    It does on my home Access 2010 machine
    It does on my work Access 2003 machine.
    db on the desktop
    Your picture folder dragged to the root of C:\
    It plays.
    Proof below


    Author Comment

    I brought the db home and tried it on my home computer and it works great. All the hours spent working on this. There must be a issue with my computer at work. Thanks for taking the time to look at it.
    LVL 26

    Expert Comment

    No Problem.

    Hope you can puzzle out what's going BANG!

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now