Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List contents of one list based on the value of another

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am building a simple form in Access 97 and need help with a list box whose contents will be based on the item selected in another list box. For the value of Project, I want to list only the test sets associated with the project specified. How would I go about doing this? I have looked at the example in the developer solutions database included with Access, but have been unable to duplicate the methods they use. Thanks.
 
for the row source of the second Listbox use something like this:

SELECT TestSetFieldName FROM TableName where ProjectFieldName = forms!FormName!FirstListBoxName;

Just replace the values with the correct names you used.

Then in the AfterUpdate event for the FirstListBoxName, send a Requery command for the SecondListBoxName
(i.e. SecondListBoxName.Requery)


PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top