View Full Version : Listbox trouble


casey
02-13-2001, 01:24 PM
I have a listbox whose Rowsource can be changed to display fields from either a parts table or a computers table by clicking a button. Depending on which is displayed, the user can then select a part or computer from the listbox and press another button to launch a form that's filtered to display detailed information on the part or computer selected in the listbox.
Problem:
When listbox's Rowsource is based on parts, the detail button works properly and opens the form filtered on the part in the listbox. However, if the Rowsource is changed to display the computers, the detail form's filter is still based on the parts criteria and launches the form displaying a part even when only computers are displayed in the listbox.

Am I doing some thing I shouldn't be by changing the rowsource of the listbox on the fly or does someone know a way to correct this problem?

pdx_man
02-13-2001, 03:44 PM
What is your code when you click on the button to open the form. I'm guessing your filter isn't pointing in the right direction.

casey
02-17-2001, 09:36 AM
Thanks for the response. I've been too busy to fix the problem properly so I made two separate listboxes and switched between visible and not visible. It's a little messy, but it works. I'll deal with that later. Thanks.