M
malibu
I have a report that displays all the invoices for clients that I
print out. The report is restricted to clients that want to receive it
through regular mail. On the report I want to control 2 labels. The
labels are "Invoice Paid" and "Credit Card Denied".
The table customers records if the credit card is denied or not. The
table lessons records if the invoice is paid or not.
I'm able to do this successfully on my other e-mail report since it's
restricted to a single client, but I don't know how to do this for
this report.
This is this code that works successfully in my e-mailed invoice,
however, I'm not sure how to modify it for the other report that lists
many clients in the same report.
I've tried may options such as the following, but the
creditcard_denied field can't be found.
If Me.CreditCard_Denied = True Then
lblCreditcardDenied.Visible = True
Else
lblCreditcardDenied.Visible = False
End If
Private Sub Report_Open(Cancel As Integer)
Dim bCreditCard As Boolean
Dim bInvoicePayed As Boolean
bCreditCard = DLookup("[CreditCard_Denied]", "Customers", "[StudentID]
=" _
& Forms![Add Lesson and Details]!StudentID)
bInvoicePayed = DLookup("[Invoice_Payed]", "Lessons", "[BillingID] ="
_
& Forms![Add Lesson and Details]!BillingID)
If bCreditCard = True Then
lblCreditcardDenied.Visible = True
Else
lblCreditcardDenied.Visible = False
End If
If bInvoicePayed = True Then
lblInvoicePayed.Visible = True
Else
lblInvoicePayed.Visible = False
End If
End Sub
Thanks very much.
print out. The report is restricted to clients that want to receive it
through regular mail. On the report I want to control 2 labels. The
labels are "Invoice Paid" and "Credit Card Denied".
The table customers records if the credit card is denied or not. The
table lessons records if the invoice is paid or not.
I'm able to do this successfully on my other e-mail report since it's
restricted to a single client, but I don't know how to do this for
this report.
This is this code that works successfully in my e-mailed invoice,
however, I'm not sure how to modify it for the other report that lists
many clients in the same report.
I've tried may options such as the following, but the
creditcard_denied field can't be found.
If Me.CreditCard_Denied = True Then
lblCreditcardDenied.Visible = True
Else
lblCreditcardDenied.Visible = False
End If
Private Sub Report_Open(Cancel As Integer)
Dim bCreditCard As Boolean
Dim bInvoicePayed As Boolean
bCreditCard = DLookup("[CreditCard_Denied]", "Customers", "[StudentID]
=" _
& Forms![Add Lesson and Details]!StudentID)
bInvoicePayed = DLookup("[Invoice_Payed]", "Lessons", "[BillingID] ="
_
& Forms![Add Lesson and Details]!BillingID)
If bCreditCard = True Then
lblCreditcardDenied.Visible = True
Else
lblCreditcardDenied.Visible = False
End If
If bInvoicePayed = True Then
lblInvoicePayed.Visible = True
Else
lblInvoicePayed.Visible = False
End If
End Sub
Thanks very much.