Results 1 to 2 of 2
  1. #1
    Bill the Cat is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Location
    Virginia
    Posts
    24

    Subform checkboxes setting main form checkbox

    Good morning,



    I have a filtered form with 2 checkboxes. One is for "Sub-Family Satisfied" and the other is for "Sub-Family Other Than Satisfied". The sub-form is filtered on the Sub-Family Number textbox and has between 3 and 12 records per sub-family. On each record on the sub-form, there are 2 checkboxes for "requirement satisfied" and "requirement other than satisfied". I need to have the Sub-Family Satisfied checkbox on the master form checked if ALL of the "Requirement Satisfied" checkboxes for all of the filtered records are set or the "Sub-Family Other Than Satisfied" checkbox set if ANY of the "Requirement Other Than Satisfied" checkboxes are set.

    Here's a snip of my form with the pertinent fields.

    Click image for larger version. 

Name:	Capture.GIF 
Views:	24 
Size:	42.2 KB 
ID:	40570


    Thank you!

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Maybe in the Subform on the AfterUpdate event, check the check boxes and run Update code if needed to update the values in the main table. Something like:

    Set dbs = CurrentDb

    If Me.RequirementSatisfied= True Then

    dbs.Execute "UPDATE tblMain
    SET [tblMain].[SubSatisfied] = True
    WHERE ([MainID] = Forms!frmMain.frmDetail![MainID])"

    Forms!frmMain.Requery

    End If

    Something like that.

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

Similar Threads

  1. Replies: 39
    Last Post: 07-28-2018, 12:27 PM
  2. Replies: 10
    Last Post: 07-05-2017, 11:31 AM
  3. Replies: 3
    Last Post: 06-29-2017, 03:02 PM
  4. Replies: 5
    Last Post: 03-30-2017, 01:42 PM
  5. Setting CheckBox value in form using VBA/Event
    By Monterey_Manzer in forum Forms
    Replies: 7
    Last Post: 05-10-2013, 11:37 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