View Single Post
  #2  
Old April 29th, 2008, 05:27 PM posted to microsoft.public.access.forms
Carl Rapson
external usenet poster
 
Posts: 517
Default Change lists of one listbox based on selection of other listbox?

In the AfterUpdate event of the "part number" list box, modify the RowSource
property of the "reason" list box as appropriate:

lstReasons.RowSource = "SELECT [field] FROM [reasons] WHERE [part_number]='"
& lstParts & "'"

Of course, use your own table, field, and control names.

Carl Rapson

"NeedHelp" wrote in message
...
If I have 2 list boxes, one that contains part numbers and one that
contains
reasons why that part may be defective, how to do make it to where the
list
given in the "reason" list box changes based on the part number selected
in
the "part number" list box?