Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002

    Unanswered: clearing checkboxes

    Is there any way to create a command button that when it’s clicked, it clears all of the checked checkboxes in the database.

    Basically, I have a checkbox (name: checkbox1) and a command button (name: command1) and, I have records in the database that have “checkbox1” clicked and there is just too many to go through every single record and uncheck them all.

    Is there a way to have “command1” do the job for me by clicking it?

    Any help would be appreciated.

  2. #2
    Join Date
    Feb 2002
    Use the following update statement in your click event for the command button:

    update table set checkbox = 0 where checkbox <> 0

  3. #3
    Join Date
    Sep 2002
    It doesnt work - Please help...

  4. #4
    Join Date
    Oct 2002

    After Update Statement. Do me.requery.

    After Update Statement. It will be updated at database.
    But not at front end populated records(which were picked up before update)

    So, after update use

    me.refesh etc. so, Form will show updated latest records.

    Other way is that,
    Use Update statement.
    As well as. Go to 1st record, Set me.checkboxfield = 0.
    Go to next record, Set me.checkboxfield = 0.
    until Last records comes.
    In this case, you don't need to Refresh, Requery it.

  5. #5
    Join Date
    Sep 2002
    Im really sorry, but, I really cant make sense of this. I dont know what update query is. I have provided the field names above. Can someone provide me with the exact code using the names i have provided in my first post.

  6. #6
    Join Date
    Nov 2001

    CurrentDB.Execute "update MyCoolTable set checkbox1=False;"

    HTH, Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts