Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Unanswered: Access List box

    I have a form with a list of outstanding job requests to be done by various people. I want a list box on the form so when its selected I can choose a person and view their job requests in more detail on another form.

    I have the other form designed already, i just need the code for the list box to select a particular person to show on the form. Do i need to do it with a query?
    Last edited by moss2076; 09-14-04 at 11:40.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Check out "input parameters"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Chicago, IL
    Should be pretty simple. If you look at the OpenForm method of DoCmd object you will see that it has a Where parameter. Set the Where parameter to filter for the person you want.

    Assuming frmYourForm is the name of the detail form and fldPersonName is the name of the field in the table your detail form is based on. And assume the name of your list box is lstPersonName. The code would look something like:

    DoCmd.OpenForm "frmYourFormName", acNormal, , "fldPersonName'" & lstPersonName & "'"

Posting Permissions

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