Hide "completed" subform records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main form <one> to subform <many> record set up. The subform has
multiple fields, and users need to have multiple subform records open at
once. In order to simplify users locating "incomplete" subforms, I would like
to give them the ability to designate a record as "complete", and then have
that record no longer show in the sub-form list.
 
You could do that with a "ItsComplete" field in the RecordSource and only
select Not ItsComplete records in the RecortSource of the SubForm. Then
requery the SubForm when the field is checked.
 
OK, for those of you who have this problem with filtering a subform based on
some other entry. This is the brute force way I overcame it (thanks to
previous poster for putting me onto the requery)
1) create a query to base the sub form on
2) Added a column to that query that was a YES/NO for the show/hide feature
3) Added an unbound check box to the header of the subform labeled
Active/Hidden
5) Created a macro named 'Requery" that was literally the requery command
with no arguments (it would requiry whatever form or record it was nested in)
6) In the subform query, used the builder to create a criteria based on the
Unbound Check box on the sub-form header. This caused the unbound check box
to act as a toggle. If it was checked yes, the query would show completed
records. If it was checked NO, the query would show incompleted records.
Since it is unbound, it would carry across master records maintaining the
correct choice for show/hide across the subforms.
7) added the Requery macro to the on update for the two controls (when
either was changed the sub-form query would be run), and added it to the on
open for the subform (so the records would start out filtered)
 
Back
Top