Jim Hewson
JHewson at karta.com
Fri Jul 15 13:00:49 CDT 2005
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