Results 1 to 6 of 6
  1. #1
    JDonnelly21 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    4

    Red face New user.. How do I reset the value of a check box

    Access 2007.. I have a check box in a form that I wish to reset using a command button. How do I achieve this or is there a more efficient way to make this happen?


    Thanks!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    When you say reset, is this what you mean?

    If it is checked and you click the command button it will uncheck and
    If it is unchecked and you click the command button it will become checked?

    If your answer is yes, then your code for the command button would be:
    Code:
    If me.checkboxname.value = -1 then
    me.checkboxname.value = 0
    Else
    If me.checkboxname.value = 0 then
    me.checkboxname.value = -1
    End if
    End if
    Change checkboxname to what your control is named

  3. #3
    JDonnelly21 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    4

    Thanks for your response...

    I am looking to reset (uncheck) all values in the form / table that are checked. The solution works on resetting the current row selection only. How do I execute this at the table level?

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You will have to do that through an update query. BTW: In your original post you spoke of a form. No mention that you wished to do this in a table. Sorry, I left my crystal ball at home and couldn't figure that out for you.

    Look here:

    http://www.youtube.com/watch?v=--PVVLIcbjE

    Alan

  5. #5
    JDonnelly21 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    4
    Thank you for the quick response...

    I am looking to reset (uncheck) all values in the form / table that are checked. The solution works on resetting the current row selection only. How do I execute this at the table level?

    Thanks again for your help!

  6. #6
    JDonnelly21 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    4
    That worked... Thanks for your assistance... I'll work on including more detail in my requests for help for the next time...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Auto Increment Reset
    By Sibtain in forum Programming
    Replies: 3
    Last Post: 10-25-2012, 01:59 AM
  2. Reset Filter On Close
    By Power in forum Forms
    Replies: 1
    Last Post: 07-26-2011, 02:41 PM
  3. Reset imageBox on a form?
    By bosve73 in forum Forms
    Replies: 0
    Last Post: 08-11-2010, 07:16 AM
  4. How to Reset Comboboxes
    By bbarrene in forum Programming
    Replies: 5
    Last Post: 01-23-2010, 11:11 PM
  5. reset primary key
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums