Uncheck all checkboxes on update

Discussion in 'Microsoft Access Forms' started by easton022, Feb 2, 2012.

  1. easton022

    easton022

    Joined:
    Feb 2, 2012
    Messages:
    5
    Likes Received:
    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?
     
    easton022, Feb 2, 2012
    #1
    1. Advertisements

  2. easton022

    easton022

    Joined:
    Feb 2, 2012
    Messages:
    5
    Likes Received:
    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

    "
     
    easton022, Feb 2, 2012
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hmh

    Uncheck an Option Group

    hmh, Aug 7, 2003, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    519
    Allen Browne
    Aug 8, 2003
  2. Guest

    OPTIONS BOX (uncheck)

    Guest, Apr 22, 2005, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    143
    Guest
    Apr 22, 2005
  3. Guest

    How to check an uncheck all

    Guest, Nov 7, 2006, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    141
    Allen Browne
    Nov 7, 2006
  4. Guest

    Using after update to uncheck box

    Guest, May 24, 2007, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    156
    Guest
    May 25, 2007
  5. 2vao

    Check/Uncheck All, write conflict

    2vao, Apr 11, 2009, in forum: Microsoft Access Forms
    Replies:
    4
    Views:
    247
Loading...

Share This Page