Results 1 to 5 of 5
  1. #1
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28

    how to tick all checkboxes

    hi



    I have a question, I have a checkbox in the formheader, and what I want is when I make a selection in the checkbox in the formheader, then all the checkboxes
    in the detail sections must be selected for the search result:

    I have tried this in vba but only the first checkbox in the detail section is selected, see picture below here, but
    I want all the checkboxes to be selected for the search result.

    My vba code:

    Private Sub felt103_AfterUpdate()


    Me.Ma1X = Me.felt103


    End Sub

    Click image for larger version. 

Name:	oversigt.png 
Views:	8 
Size:	3.8 KB 
ID:	20860

  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,926
    Options:

    1. SQL UPDATE action that sets value for all records in table that meet specific criteria

    2. looping code that moves to each record in the form's RecordSource and sets the field
    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
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28
    thanks june7

    do you have any examples of looping code in the form's RecordSource ?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Can use RecordsetClone.

    With Me.RecordsetClone
    .MoveFirst
    While Not .EOF
    .Edit
    !Ma1X = Me.felt103
    .Update
    .MoveNext
    Wend
    End With
    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. Tick Boxes = WHERE clause
    By dr4ke1990 in forum Forms
    Replies: 9
    Last Post: 11-08-2013, 12:03 PM
  2. how to add tick boxs to filter
    By sspreyer in forum Programming
    Replies: 1
    Last Post: 11-05-2013, 09:13 AM
  3. Tick Box in a Query
    By Cran29 in forum Queries
    Replies: 1
    Last Post: 06-15-2012, 05:33 PM
  4. Tick Box Hides Text Box
    By Arrrggggjhhhhh!!!! in forum Forms
    Replies: 4
    Last Post: 02-29-2012, 10:42 AM
  5. Password on a Tick Box?
    By wadey in forum Security
    Replies: 1
    Last Post: 04-25-2011, 12:40 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