Help with checking Checkbox (from multiple checkboxes) based on field value

Garindan

Registered User.
Local time
Today, 08:31
Joined
May 25, 2004
Messages
250
Sorry, I didn't really know if this should be in the VBA, Reports or General forum.

I have a field 'Payment Types' with values (Cash, Cheque, Debit/Credit Card) and a field 'Payment Received' which is Yes/No.

When putting the order through the user selects the payment type and ticks a box if payment has been received.

On a report for delivery drivers, the owner wants it simple for the driver... he wants all the payment types listed with a checkbox next to each one, then wants the appropriate box ticked if payment has been received.

So I need something on the report (or underlying query) which ticks the appropriate box, i.e.

If payment received = true then payment type checkbox = true.

Or should I put the payments into a separate table with both fields so multiple payment types can be marked as paid?

Many thanks for any help!
 
In the report just add the payment received field, if it is ticked it will be ticked in the report. As simple as that, or I am not getting what your exact problem is..
 
No, on the report the owner wants all three payment types listed, with a checkbox next to each one. Then if payment is received the box is ticked, but obviously only for the payment type.

So there are three or more checkboxes on the report (one for each) but there's actually only one payment received field/record.

Basically I want it to be ticked next to the appropriate payment type.
 
Right gotcha, can you show the Query you are using?

Just create three new Fields in the underlying query. Based on the payment type make the field true/false using IIF statement.
 
Thanks. I can show the query but there son need, it has both 'Payment Type' and 'Payment Received' fields in it.

How would the IIF statements look? Something like...
PaidByCard: IIf([PaymentReceived]="True" And [PaymentType]="Debit/Credit Card",True,False)
PaidByCash: IIf([PaymentReceived]="True" And [PaymentType]="Cash",True,False)
PaidByCheque: IIf([PaymentReceived]="True" And [PaymentType]="Cheque",True,False)
 
Yes, although you should not enclose True in Quotes.. The following should suffice.
Code:
PaidByCard: IIf([PaymentReceived] And [PaymentType]="Debit/Credit Card",True,False)
PaidByCash: IIf([PaymentReceived] And [PaymentType]="Cash",True,False)
PaidByCheque: IIf([PaymentReceived] And [PaymentType]="Cheque",True,False)
 

Users who are viewing this thread

Back
Top Bottom