G
GD
I'm trying to make areas of my form visible, based on a check box, along with
a dollar amount limit that each user will have. How is my code wrong?
Nothing appears when I click the check box. Also does the code go in both
the AfterUpdate & FormCurrent?
chkPaybackApproved is check box
txtVPRA is text box containing the form's $ amount
tblUsers is table containing everyone's approval limit
UserID of that table should coincide with CurrentUser(), thus determining
the limit allowed
Private Sub chkPaybackApproved_AfterUpdate()
Me.cboApprBy.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.txtApprDate.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.lblPaybackReason.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.cboPaybackReason.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
End Sub
a dollar amount limit that each user will have. How is my code wrong?
Nothing appears when I click the check box. Also does the code go in both
the AfterUpdate & FormCurrent?
chkPaybackApproved is check box
txtVPRA is text box containing the form's $ amount
tblUsers is table containing everyone's approval limit
UserID of that table should coincide with CurrentUser(), thus determining
the limit allowed
Private Sub chkPaybackApproved_AfterUpdate()
Me.cboApprBy.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.txtApprDate.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.lblPaybackReason.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
Me.cboPaybackReason.Visible = (Me.chkPaybackApproved And Me.txtVPRA <
DLookup("[Limit]", "tblUsers", "[UserID]='" & CurrentUser() & "'"))
End Sub