Drop-down not going to default list when closed and reopened

Posted on 2011-10-19
Last Modified: 2012-05-12
I have a form that has a drop-down for alist of projects.  When the form opens, the drop-down should show all projects.  there is also on the form a drop-down showing user from which a user can be selected, then the Project drop-down is change to only reflect the projects for that user.  However, sometimes, when the form is closed, rather than reverting to all projects, it keeps the last listing.  Say I have Select PRojectID FROM tblProjects, but whent the user decides to filter for only one person, the statemetn changes to SELECT ProjectID FROM tblProjects where ProjectAssignedTo = 'SMITH'.  So, how to I ensure that when the form opens, the project dro-down is always SELECT PROJECTID from tblProjects, with no filter?
Question by:ssmith94015
    LVL 119

    Accepted Solution

    set the RowSource in the unload  or  load event of the form

    me.combo.rowsource="SELECT PROJECTID,ProjectAssignedTo from tblProjects"

    Author Closing Comment

    Thank you,  in testing, it seems to be working now.


    Featured Post

    What Security Threats Are You Missing?

    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

    Suggested Solutions

    We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
    Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now