Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2006, 05:41 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reset Subform to Default Values

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

 
Old January 6th, 2006, 06:20 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform not displaying values after adding updates jlangdon Access 1 April 23rd, 2008 03:00 PM
refer to subform values stepdev Access VBA 2 December 7th, 2006 12:13 PM
How to disable subform untill values selected in m method Access 3 June 29th, 2005 07:22 AM
Default values? Raymie_C Access VBA 2 May 16th, 2005 11:48 AM
Default Values davest Access VBA 2 October 19th, 2004 05:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.