G
Guest
I have the following code on the OnOpen property of the form.
Private Sub Form_Open(Cancel As Integer)
If Me.PAID = "-1" Then
Me.DATEPAID.Enabled = True
Me.AMOUNTPAID.Enabled = True
Me.PAYMENTTYPE.Enabled = True
Else
Me.DATEPAID.Enabled = False
Me.AMOUNTPAID.Enabled = False
Me.PAYMENTTYPE.Enabled = False
End If
End Sub
I want the DatePaid, AmountPaid, and PaymentType fields to be inactive
unless the PAID checkbox is checked. But once I check the box for one record,
the three gray fields become active for ALL records. How can I make it
specific to each individual record?
Also, once they are active, is there a way to make them a required field,
but not when they are inactive?
Private Sub Form_Open(Cancel As Integer)
If Me.PAID = "-1" Then
Me.DATEPAID.Enabled = True
Me.AMOUNTPAID.Enabled = True
Me.PAYMENTTYPE.Enabled = True
Else
Me.DATEPAID.Enabled = False
Me.AMOUNTPAID.Enabled = False
Me.PAYMENTTYPE.Enabled = False
End If
End Sub
I want the DatePaid, AmountPaid, and PaymentType fields to be inactive
unless the PAID checkbox is checked. But once I check the box for one record,
the three gray fields become active for ALL records. How can I make it
specific to each individual record?
Also, once they are active, is there a way to make them a required field,
but not when they are inactive?