R
Robert Robinson
I am creating a detailed Sales Journal. I have a "Net Sale" field from a
query. I also include payment terms (cash, check, credit in check boxes) in
the same query. On my report, I would like to like each line to display the
"Net Sale" in the respective "Cash", "Check", or "Credit" columns based on
which box is checked. For example, if an individual sale line was a cash sale
(denoted by a check on the cash check box, I want the net sale amount for
that line to appear in the cash column. I think the VBA code that I would
want to use is something like:
If Me.Cash (the checkbox field for cash) = True Then
Me.Cashbal (the unbound cash report field) = Me.Netsale (the bound sale
field)
Else
Me.Cashbal = " "
The first question is if this is the proper use of code. The second question
is where should such code be placed. Since the report fields themselves do
not accept event code (greyed out), it seems that the code should be placed
at the form level. But where? On Open? On Activate? Please advise.
query. I also include payment terms (cash, check, credit in check boxes) in
the same query. On my report, I would like to like each line to display the
"Net Sale" in the respective "Cash", "Check", or "Credit" columns based on
which box is checked. For example, if an individual sale line was a cash sale
(denoted by a check on the cash check box, I want the net sale amount for
that line to appear in the cash column. I think the VBA code that I would
want to use is something like:
If Me.Cash (the checkbox field for cash) = True Then
Me.Cashbal (the unbound cash report field) = Me.Netsale (the bound sale
field)
Else
Me.Cashbal = " "
The first question is if this is the proper use of code. The second question
is where should such code be placed. Since the report fields themselves do
not accept event code (greyed out), it seems that the code should be placed
at the form level. But where? On Open? On Activate? Please advise.