Y
Yam84
Hello,
I have a form and subform which i use to edit employee information.
On the main form, I have a check box; if checked, the subform will
display itself. Here is the code in the on current event of the main
form:
Private Sub Form_Current()
'On current event of main form
'Check if empLocker checkbox is selected
'then show or hide subform
If Me.empLocker = True Then
Me.frmEmpLockersLocks.Visible = True
Else
Me.frmEmpLockersLocks.Visible = False
End If
End Sub
Here is the code in the check box:
Private Sub empLocker_AfterUpdate()
'After Update of checkbox
'Check if empLocker checkbox is selected
'then show or hide subform
If Me.empLocker = True Then
Me.frmEmpLockersLocks.Visible = True
Else
Me.frmEmpLockersLocks.Visible = False
End If
End Sub
The functionality works; anytime the check box is checked, the
subform appears, but I don't always see the items on the form. The
form header is displayed, but the form detail is blank. Any idea why
this might be happening?
I have a form and subform which i use to edit employee information.
On the main form, I have a check box; if checked, the subform will
display itself. Here is the code in the on current event of the main
form:
Private Sub Form_Current()
'On current event of main form
'Check if empLocker checkbox is selected
'then show or hide subform
If Me.empLocker = True Then
Me.frmEmpLockersLocks.Visible = True
Else
Me.frmEmpLockersLocks.Visible = False
End If
End Sub
Here is the code in the check box:
Private Sub empLocker_AfterUpdate()
'After Update of checkbox
'Check if empLocker checkbox is selected
'then show or hide subform
If Me.empLocker = True Then
Me.frmEmpLockersLocks.Visible = True
Else
Me.frmEmpLockersLocks.Visible = False
End If
End Sub
The functionality works; anytime the check box is checked, the
subform appears, but I don't always see the items on the form. The
form header is displayed, but the form detail is blank. Any idea why
this might be happening?