Subject: Reset Subform to Default Values
Posted By: kindler Post Date: 1/6/2006 4:41:07 PM
So I have my main form with 8 fields, and 11 subforms each containing between 2 and 16 checkboxes, with 105 total checkboxes between all the subforms.  No more than 20% will be checked at one time, so I'd rather set them all to false and then just set those the query indicates to true through an algorithm instead of checking if each and every one is in the query results.  Obviously to go through setting each one back to false would take more time than I'd like, so I was wondering if there was some way to reset all the values back to their defaults on a form by form basis.

PS. I know the design is awful, whenever I look at it I cringe, but it's how they want the data presented.

Thanks,
Ryan

Reply By: kindler Reply Date: 1/6/2006 5:20:35 PM
The other option I can think of is to set the Control Source, but I'm not sure the code to do that given a table that looks like the following:

Main Form's 8 fields (common) -1:*->Subforms (Systems)
Subform -1:*-> Checkboxes (Cabinets)

On displaying a new record, a query of all System/Cabinet combos is generated, from that query, the record source for each subform is [SELECT Cabinet FROM qrySysSearch WHERE System = 'foo'] where foo is the name of the subform as well.  If there's an easy way to do a True/False determination on if the value appears in the recordset by adjusting the control source, that'd be great.


Go to topic 38371

Return to index page 401
Return to index page 400
Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393
Return to index page 392