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?
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: