Uncheck all checkboxes on update

Joined
Feb 2, 2012
Messages
5
Reaction score
0
Hi there,
I have a form with about 14 checkboxes (but they are purely labels, not associated with anything)...When a user clicks on one, it brings up another form for additional information and stored in another table.

When the user is done, they click Submit, and I need ALL checkboxes to go back to False. I have seen users suggesting an update query but my checkboxes are LABELS so I can't put a table in the query.

I was thinking of putting some VBA code in the OnClick event of "Submit"...Something like
For i= # to #
me.checkbox(i) = false
Next i

However that doesn't work. Any suggestions?
 
Joined
Feb 2, 2012
Messages
5
Reaction score
0
Well no one answered but I was able to code a solution for anyone interested.
In the Click() event for my Submit button I put the following code after my "New record" command

"
For Each Control In Form.Controls 'Clear all form checkboxes on Submit
If Control.ControlType = acCheckBox Then
Control.value = False
End If
Next Control

"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top