I am trying to capture the value of a checkbox on the current report.
I am using the IsNull to try and get around a "Runtime error: 2427 You entered an expression that has no value"
when I use the code;
varPaid = Me!Paid
I am assuming I get this error because sometimes the checkbox isn't ticked??
Anyway, I thought I had it now but the msgbox to get the checkbox value always returns a false - even when the checkbox is ticked.
The code I am using is;
Private Sub Report_Open(Cancel As Integer)
Dim varPaid As Boolean
'check the value
MsgBox varPaid
varPaid = IsNull(Me!Paid)
'check the value again
MsgBox varPaid
If varPaid = False Then
Me.LblPaid.Visible = False
Else
Me.LblPaid.Visible = True
'Me.Section(4).Visible = True
End If
End Sub
What am I not getting (ok, all of it I hear u say <grin>.
josie
I am using the IsNull to try and get around a "Runtime error: 2427 You entered an expression that has no value"
when I use the code;
varPaid = Me!Paid
I am assuming I get this error because sometimes the checkbox isn't ticked??
Anyway, I thought I had it now but the msgbox to get the checkbox value always returns a false - even when the checkbox is ticked.
The code I am using is;
Private Sub Report_Open(Cancel As Integer)
Dim varPaid As Boolean
'check the value
MsgBox varPaid
varPaid = IsNull(Me!Paid)
'check the value again
MsgBox varPaid
If varPaid = False Then
Me.LblPaid.Visible = False
Else
Me.LblPaid.Visible = True
'Me.Section(4).Visible = True
End If
End Sub
What am I not getting (ok, all of it I hear u say <grin>.
josie