Hi,
I am not new to Access but I am new to VBA programming starting this weekend, but have made decent progress. Simultaneously I would like to hide/unhide a subform based on a checkbox. Additionally, if there were values in the subform, when it is hidden again I want the values in the subform to be null. For the record, I have been successful with the visible/invisible part and to make values null on the main form, but I haven't been able to reference the subform controls to make null.
Here's the code
Private Sub KCCQ_AfterUpdate()
If Me.KCCQ = -1 Then
Me.D_1_KCCQ_12_Form.Visible = True
Else
Me.D_1_KCCQ_12_Form.Visible = False
'***Insert Code Here*** = Null
End If
End Sub
Also, "D_1_KCCQ_12_Form" is the name of the subform container, not the subform name in the navigation pane.
Again, the above code the astrerisk row works fine. I have tried "Me.D_1_KCCQ_12_Form.Form._____ = Null", but it's not right, and not surprisingly the "Complete Word" in the VBA editor doesn't list the control names to choose from (but other objects).
Any help would be appreciated. Thank you.