Dale James
asked on
MS ACCESS: Loop through checkboxes in a Tab Control and check status
Hello Team
I have a form which contains a tab control consisting of 7 pages. Within Page7 I have 9 checkboxes.
What I would like to achieve is to have code which on a save event will reference Page7 and loop through each checkbox to see if they have a true or false value.
if a true value is identified from any of the checkboxes then the code can flow through to completing the save event but if all 9 checkboxs each return a false value then the code will exist sub
Form Name: frmRenewalsAudit
Tab Control name: TabCtlCats
Checkbox Names: Chk1, Chk2 etc through to Chk9
Any assistance would be greatly appreciated.
Thank you in advance
Dale
I have a form which contains a tab control consisting of 7 pages. Within Page7 I have 9 checkboxes.
What I would like to achieve is to have code which on a save event will reference Page7 and loop through each checkbox to see if they have a true or false value.
if a true value is identified from any of the checkboxes then the code can flow through to completing the save event but if all 9 checkboxs each return a false value then the code will exist sub
Form Name: frmRenewalsAudit
Tab Control name: TabCtlCats
Checkbox Names: Chk1, Chk2 etc through to Chk9
Any assistance would be greatly appreciated.
Thank you in advance
Dale
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What if there's more checkboxes on the page than the 9 mentioned?
ASKER
Hello Norie and Ste5an
Thank you very much for the subs provided.
Norie: As you have correctly pointed out, yes there can be occasions where the number of checkboxs can differ so therefore, the code provided by yourself and Ste5an has answered all scenarios. Code is working perfectly and as required.
Thank you once again.
Dale
Thank you very much for the subs provided.
Norie: As you have correctly pointed out, yes there can be occasions where the number of checkboxs can differ so therefore, the code provided by yourself and Ste5an has answered all scenarios. Code is working perfectly and as required.
Thank you once again.
Dale
ASKER
Once again...thank you Norie and Ste5an.