Nicholson, Karen
cyx5 at cdc.gov
Fri Jul 15 13:20:46 CDT 2005
It is not bound. The first unbound combo box has the user select a test. There are around 400 tests. Once the test is selected, the second combo box stores the projects on which the selected test has occurred. At any given time, a test might be outstanding on four or five projects. But, since the beginning of time, that test may have been on seven hundred projects. Normally the user only needs to see those projects that are open. But the PIA wants to see all on occassion so I just wanted to put a little button to change the datasource of the project box to show all of them. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Friday, July 15, 2005 2:15 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Changing Combo Box Data Source If this is a bound form, then if you filter the combo but don't filter the records underneath the form, any records where the FK in the underlying record is missing from the combo will show a blank in the combo. That is what the solution I gave is designed to address. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Hewson Sent: Friday, July 15, 2005 2:01 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Changing Combo Box Data Source I'm not sure what that would do? Karen wants the combo box to show FILTERED records unless the user wants to see UNFILTERED records. I agree that a SQL statement would be able to give the data she wants. On the after update event of a button somewhere on the form; change the Row Source of the combo box with an appropriate SQL statement. Changing the Caption of the Button from "All" to "Open Only" would help the user and indicate which SQL statement was used. Then refresh the form. HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Friday, July 15, 2005 12:45 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Changing Combo Box Data Source The "correct" way to handle this is to have a query that shows ALL records (UNFILTERED) and another that shows FILTERED records. In OnEnter, change the query to the FILTERED query, in OnExit change the query to the UNFILTERED query. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Nicholson, Karen Sent: Friday, July 15, 2005 1:32 PM To: Access Developers discussion and problem solving Subject: [AccessD] Changing Combo Box Data Source I know there is a way to do this. Where are the Friday Jokes? My form opens. The combo box on the form is filtering for only "Open" items. However, PIA user wants the option to see all projects, open and closed. What code do I throw on a button to change the record source of the combo box to take off the filter? Is it setting the recordset? Thanks. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com