Results 1 to 4 of 4
  1. #1
    PinkyP_23 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2014
    Posts
    2

    Multiple Bound Check Box 'Resets'

    G'day guys,



    I’ve got a bit of an issue and wondering if someone could help me.

    I have to be able to build a report based on user selected records in a form. That’s all easy enough, however I’m having difficulty resetting all of the check boxes to their default ‘no’ (0).

    What I’ve done is created a bound check box for each displayed record. When you click the reset button the following VBA runs;

    Private Sub ResetButton_Click()
    If ScheduleBuilder = -1 Then
    'Reset back to default (0 = No)
    ListBuilder = 0
    End If
    End Sub

    However this only works on the last checked record or on each individual record if I put a button on them.


    Is there a code which I can run on a button which will reset all of the record’s check boxes displayed in the form at once?

    By way of background;
    Form = SearchResultsForm
    Button = ResetButton


    Field check box is bound to = ListBuilder
    Table = Database


    Any help would be greatly appreciated!

    Cheers,
    Pinky

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try:

    Private Sub ResetButton_Click()
    CurrentDb.Execute "UPDATE Database Set ListBuilder=False"
    Me.Refresh
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    PinkyP_23 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2014
    Posts
    2
    Quote Originally Posted by June7 View Post
    Try:

    Private Sub ResetButton_Click()
    CurrentDb.Execute "UPDATE Database Set ListBuilder=False"
    Me.Refresh
    End Sub
    Thank you June - you're a life saver.

    I gave it a crack and it would only reset the last edited box, however after just popping a quick close and open, upon reopen all the boxes were back to default.

    Thank you again June!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Maybe instead: Me.Requery
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-10-2014, 01:04 PM
  2. Replies: 6
    Last Post: 01-30-2014, 05:57 PM
  3. Can you have mulitiple tabs bound to multiple tables?
    By Access_Novice in forum Programming
    Replies: 2
    Last Post: 01-07-2014, 11:00 AM
  4. Replies: 3
    Last Post: 03-05-2013, 02:17 AM
  5. Bound form with bound combobox
    By Jerry8989 in forum Access
    Replies: 2
    Last Post: 12-05-2011, 01:50 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