Uncheck all checkboxes on update

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

  1. easton022

    easton022

    Joined:
    Feb 2, 2012
    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
    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?

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

    Uncheck an Option Group

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

    OPTIONS BOX (uncheck)

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

    How to uncheck an option button?

    Guest, Jul 19, 2006, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    4,109
    fredg
    Jul 19, 2006
  4. Guest

    How to check an uncheck all

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

    how do I uncheck option group?

    Guest, Apr 7, 2007, in forum: Microsoft Access Forms
    Replies:
    5
    Views:
    592
    Guest
    Apr 7, 2007
  6. Guest

    Using after update to uncheck box

    Guest, May 24, 2007, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    309
    Guest
    May 25, 2007
  7. SandySun

    Check/uncheck

    SandySun, Oct 23, 2008, in forum: Microsoft Access Forms
    Replies:
    8
    Views:
    460
    SandySun
    Nov 6, 2008
  8. 2vao

    Check/Uncheck All, write conflict

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