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!

SORTING OR FILTERING INSIDE A LISTBOX

Status
Not open for further replies.

HerickP

IS-IT--Management
May 10, 2000
68
US
hi,<br><br>I have a form with a listbox displaying all the fields of one table.....there are 4 fields, PO number, customer name, location shipped to, and date....is is possible to have the listbox sorted (or filtered?) so I can have one command button ( eg: command button 1 labeled &quot;california&quot; and command button 2 labeled &quot;New York&quot;) that when I click on one of the buttons, it will only display on the listbox the records for the particular region ( when I click on &quot;california&quot; it will display all the records in the list box specific to california)........Too hard??? I would appreciate so much an answer....Thanks again guys!!!
 
couldn't you jsut have a filter associated with the button to limit the location field to records that were &quot;california&quot; and you could do the same with NY, i'd probably do a combo box with the location names and use the after update property so i didn't have to have a button for each state/location, that could be very non-space friendly. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Possibly a more common way to handle this type of problem is to have two comboboxes, and synch up the second with the first. The first comobox would contain the region. In the AfterUpdate event of that combo you would requery the second combobox. The underlying query of the second combo would have the 1st combo as the selection criteria for the &quot;region column. Something like:<br><br>[Forms!MyFormName!FirstCombo]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top