Results 1 to 12 of 12
  1. #1
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144

    Clearing Checkbox After Report

    I have a form with several checkboxes and a cbo box.



    A name is selected from the cbo and a checkbox selected for a specific report. The checkboxes are named and associated with a macro to trigger the report.

    Can anyone tell me please how to clear the cbo and checkbox once the report has opened and then is closed, so a new selection can be made?

    Regards
    Buck

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Me.Requery should reset the combo box.

    How are the check boxes named?

    Dale

  3. #3
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Thanks Dale for the cbo solution.

    checkboxes are named for ease of identify when troubleshooting, some e.g., NoFinChosen; NoFinBWCChosen; FinChosen; FinBWCChosen, etc.

  4. #4
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Dale,

    I understand the requery will work best on the form's "on open event." But in this case, when users select the preview or print button for the report, the report opens or prints, once the report is closed, Users will still have visibility to the form to make another selection, this is when I need the check boxes and cbo to be clear, OR maybe I'm just putting the "requery" command in the wrong event.

  5. #5
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    You can try;
    Put this with the requery command.

    if NoFinChosen = true the NoFinChosen = false
    Do this for each check box.

    Note; If you keep the IF function on 1 line you don't need an End If.

    Dale

  6. #6
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Thanks Dale. I may bypass this process and have the users clear them out themselves, since there are 24 check boxes. But if I decide to use this process, what event would it be please?

  7. #7
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    I would us the Print command button.
    After everything is printed, just before you leave the sub.

    I am looking for code I wrote to clear check boxes a little while ago.
    If I find it I will post it for you.

    Dale

  8. #8
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Dale,

    I decided to enter each name as you suggested in the previous thread and it worked perfectly. . . Thanks so much.


    Quote Originally Posted by rzw0wr View Post
    I would us the Print command button.
    After everything is printed, just before you leave the sub.

    I am looking for code I wrote to clear check boxes a little while ago.
    If I find it I will post it for you.

    Dale

  9. #9
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Buckwheat,

    Code:
    Dim ctl As Control
    
    For Each ctl In Me.Controls
        If ctl.ControlType = acCheckBox Then
            ctl = False
        End If
    Next ctl
    This is the bare bones code.

    The only thing you need to do is make a command button, Give it a name like cmdReset and copy this into it.


    Dale

  10. #10
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Hi Dale,

    Thanks, I've already entered the code from your first suggestion, so I'll keep this one for future reference. Thanks again. I've also added another thread for help advancing to a new record, if you're available to help please.

  11. #11
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Buckwheat, You have one of the best here helping you now.
    All I would do is confuse the situation.

    Dale

  12. #12
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    ok, thanks

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

Similar Threads

  1. Multiple checkbox filtering & Clearing
    By Havvix in forum Access
    Replies: 3
    Last Post: 12-05-2012, 04:42 PM
  2. Checkbox Report
    By MBA80 in forum Reports
    Replies: 6
    Last Post: 06-01-2012, 07:21 AM
  3. Clearing Checkbox on New Record
    By rossi45 in forum Programming
    Replies: 5
    Last Post: 04-16-2012, 05:30 PM
  4. Hiding checkbox on report
    By bluezidane in forum Reports
    Replies: 2
    Last Post: 06-29-2011, 12:46 PM
  5. Open report if checkbox is ticked
    By Patience in forum Reports
    Replies: 3
    Last Post: 06-23-2010, 08:34 AM

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