Results 1 to 6 of 6
  1. #1
    HS_1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    87

    one rundomly selected check box toggles other check boxes in a group

    Wonder if it is possible to randomly check/uncheck one check box in a group which will check the others. I have continuous form with bunch of checkboxes which progress individual record (drawing number), in one case I would like to progress the activities by group (zone) 

    I found out that the users are not as diligent and don't check all the required boxes and this give me not accurate progress "stage". Checking one which toggle the others would solve my problem. 
    Would appreciate any suggestions. 


    I have created small dBase for you to view.
    Thans f your help.

    Attached Files Attached Files

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,684
    Not really sure that I understand what you are trying to dom but maybe this is close.

    So if Me.txtEhtStage is 8 or less, set Me.txtEhtStage to 9 and add the date to Me.txtModeledDate?
    If Me.txtEhtStage is 9 or greater, just set Me.txtModeledDate to the date.

    Maybe this is what you want:
    Code:
    Private Sub chckModeled_AfterUpdate()
    
        Select Case Me.chckModeled
            Case Is = True
                If Me.txtEhtStage < 9 Then
                    Me.txtEhtStage = 9
                    Me.txtModeledDate = Date
                Else
                    '  If Me.txtEhtStage >= 9 Then
                    Me.txtModeledDate = Date
                    '  End If
                End If
            Case Is = False
                If Me.txtEhtStage > 9 Then
                    Me.txtModeledDate = ""
                Else
                    Me.txtEhtStage = 7
                    Me.txtModeledDate = ""
                End If
        End Select
    End Sub
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  3. #3
    HS_1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    87
    Ssanfu, thanks for the replay. What I need is to find a way to check only one box in a group which will update all the records in that group instead of checking each box individually.
    For example zone PP-40-9074-01 has 4 drawings assigned to it: E-PP-40-9074-01-01, 02, 03 & 04. If lets say I check box for drawing 03 then this action would put date, assigns stage 9 for drawing 03 and at the same time sets checkboxes for dwg 01, 02 & 04 to "true" and progresses the stages and dates for these three records to the same values as for drawing 03.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,684
    If I understand correctly, this
    EHT_Iso_Dwg_No Modeled Stage
    Modeled Date
    Zone
    PP-40-9074-01-01 False 3 PP-40-9074-01
    PP-40-9074-01-02 False 3 PP-40-9074-01
    PP-40-9074-01-03 False 3 PP-40-9074-01
    PP-40-9074-01-04 False 3 PP-40-9074-01


    should become this
    EHT_Iso_Dwg_No Modeled Stage
    Modeled Date
    Zone
    PP-40-9074-01-01 True 9 2/5/2020 PP-40-9074-01
    PP-40-9074-01-02 True 9 2/5/2020 PP-40-9074-01
    PP-40-9074-01-03 True 9 2/5/2020 PP-40-9074-01
    PP-40-9074-01-04 True 9 2/5/2020 PP-40-9074-01
    when the check box for drawing 03 is checked (True).
    If the stage is less than 9, set the stage to 9
    If the stage is 9 or greater, just set the date to today's date.

    You also have code for when a check box is unchecked (false).
    If PP-40-9074-03 check box is checked (True) and you uncheck the check box (EHT_Modeled), EHT_Modeled is set unchecked (false) and the dates are deleted for all records that are PP-40-9074.

    What should the STAGE be re-set to? In your code, the STAGE is set to 7.

    EHT_Iso_Dwg_No Modeled Stage
    Modeled Date
    Zone
    PP-40-9074-01-01 False 7 PP-40-9074-01
    PP-40-9074-01-02 False 7 PP-40-9074-01
    PP-40-9074-01-03 False 7 PP-40-9074-01
    PP-40-9074-01-04 False 7 PP-40-9074-01





    Is this close?
    Attached Files Attached Files
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  5. #5
    HS_1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    87
    ssanfu, I can't thank you enough for helping me yet again, this code works perfectly.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,684
    Whew, I didn't mess up!!

    Happy to help.......
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

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

Similar Threads

  1. Replies: 3
    Last Post: 07-06-2018, 09:35 AM
  2. Check all check boxes on continuous form
    By NISMOJim in forum Forms
    Replies: 7
    Last Post: 06-14-2016, 02:14 AM
  3. Replies: 17
    Last Post: 09-02-2015, 09:05 PM
  4. Check box based on values of other check boxes?
    By Michael.Reynolds1775 in forum Forms
    Replies: 3
    Last Post: 03-25-2015, 12:58 AM
  5. Help with option group/check boxes?
    By bwest11 in forum Forms
    Replies: 3
    Last Post: 03-14-2011, 07:20 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
  •  
Tech Forums: Microsoft Office Forums