M
Mary Beth
I have a form and subform in which I am enabling and disabling 3 controls in
the subform, based on "Null" criteria in a control on the form. I am using
the following code and it works, except when I close the form and/or
database. When the form or db is closed, the 3 controls on the subform are
disabled regardless if the control on the form is 'Not IsNull'. I want the 3
controls to stay enabled when the other field is 'Not IsNull' I would
appreciate any help. Thanks.
Private Sub dtmFundsReqDt_AfterUpdate()
If Not IsNull(Me.dtmFundsReqDt) Then
Me.fsubExpenses.Form!dtmRequestDt.Enabled = True
Me.fsubExpenses.Form!strExpDescrip.Enabled = True
Me.fsubExpenses.Form!curRequestAmt.Enabled = True
End If
If IsNull(Me.dtmFundsReqDt) Then
Me.fsubExpenses.Form!dtmRequestDt.Enabled = False
Me.fsubExpenses.Form!strExpDescrip.Enabled = False
Me.fsubExpenses.Form!curRequestAmt.Enabled = False
End If
End Sub
the subform, based on "Null" criteria in a control on the form. I am using
the following code and it works, except when I close the form and/or
database. When the form or db is closed, the 3 controls on the subform are
disabled regardless if the control on the form is 'Not IsNull'. I want the 3
controls to stay enabled when the other field is 'Not IsNull' I would
appreciate any help. Thanks.
Private Sub dtmFundsReqDt_AfterUpdate()
If Not IsNull(Me.dtmFundsReqDt) Then
Me.fsubExpenses.Form!dtmRequestDt.Enabled = True
Me.fsubExpenses.Form!strExpDescrip.Enabled = True
Me.fsubExpenses.Form!curRequestAmt.Enabled = True
End If
If IsNull(Me.dtmFundsReqDt) Then
Me.fsubExpenses.Form!dtmRequestDt.Enabled = False
Me.fsubExpenses.Form!strExpDescrip.Enabled = False
Me.fsubExpenses.Form!curRequestAmt.Enabled = False
End If
End Sub