I need to modify an existing invoicing database:
I'd like to select which items of an invoice I would like to show on the actual invoice printout. There's a "Print" checkbox field in each record in the invoice details table. When this field is unchecked, I would like for that line item (entire record) to not print on the invoice report. I figured I could set the visible properties of the different fields in the detail section to False when the checkbox is not checked. I believe it should be in the OnFormat event of the detail section of my report - but I've tried several options and I cant' get it to work.
this gives me the following error: "Runtime error '2427': you entered an expression that has no value"
the above code gives me the same error.
what am I doing wrong?
Sandy
I'd like to select which items of an invoice I would like to show on the actual invoice printout. There's a "Print" checkbox field in each record in the invoice details table. When this field is unchecked, I would like for that line item (entire record) to not print on the invoice report. I figured I could set the visible properties of the different fields in the detail section to False when the checkbox is not checked. I believe it should be in the OnFormat event of the detail section of my report - but I've tried several options and I cant' get it to work.
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!chkPrint = True Then
Me!Item.Visible = True
Else
Me!Item.Visible = False
End If
End Sub
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!chkPrint = -1 Then
Me!Item.Visible = True
Else
Me!Item.Visible = False
End If
End Sub
what am I doing wrong?
Sandy