Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset subform control values based on main form input 1

Status
Not open for further replies.

xentaur

Programmer
Nov 17, 2003
35
AU
Greetings

Scenario:
Mainform with Subform.
Subform is continuous form based on a query.

Option group on Mainform enables/disables access to Subform.
When Subform is enabled, users can update checkboxes on the continous form in Subform.

Problem:
My end users are indecisive. If they enable Subform via the Option group on Mainform and change values of the checkboxes on the continuous form Subform BUT then decide to disable Subform via Option Group, it leaves the updated values in the Subform.

I need to be able to reset checkbox values in continous Subform if the user disables Subform via the Option group on Mainform.

As Subform is a table-based query I'm a little perplexed at how to go about counting through the subform itself and resetting all checkbox values to 0.

Any assistance greatly appreciated.

Cheers all


 
A starting point (possibly in the AfterUpdate event procedure of the frame):
With Me![subform control name].Form
.Recordset.MoveFirst
While Not .Recordset.EOF
![name of checkbox] = False
.Recordset.MoveNext
WEnd
End With

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Lightning response! I barely had time to spin in my chair.

Thanks PHV

Exactly the solution I was looking for.

Works perfectly.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top