Hi
I'm relatively new to Access and have been trying to create what I thought would be an easy expression.
My main table is (client field = primary key and in relationship with table below):
Client | Client name |CHAPS Charge
123 |ABC | £20
999 | XYZ | £20
I have another table with:
Client | Payment Method
123 | CHAPS
999 | BACS
I now want to run a query with these headings that returns the following results:
Client | Client Name | Payment Method |Chaps Charge
123 | ABC | CHAPS | £20
999 | XYZ | BACS | £0
I.e. where Payment method = Chaps, return the value within CHAPS. However at the moment my table is returning £20 for client 999.
I have run the following expression in criteria in my query but I keep getting data type criteria mismatch error messsages:
IIf([Payment method]="BACS","",[CHAPS Charge])
Can anyone tell me what I'm doing wrong? I know this should be relatively straightforward but as I say, I'm new to all this!!
Many thanks for any help you can offer me
Brian
I'm relatively new to Access and have been trying to create what I thought would be an easy expression.
My main table is (client field = primary key and in relationship with table below):
Client | Client name |CHAPS Charge
123 |ABC | £20
999 | XYZ | £20
I have another table with:
Client | Payment Method
123 | CHAPS
999 | BACS
I now want to run a query with these headings that returns the following results:
Client | Client Name | Payment Method |Chaps Charge
123 | ABC | CHAPS | £20
999 | XYZ | BACS | £0
I.e. where Payment method = Chaps, return the value within CHAPS. However at the moment my table is returning £20 for client 999.
I have run the following expression in criteria in my query but I keep getting data type criteria mismatch error messsages:
IIf([Payment method]="BACS","",[CHAPS Charge])
Can anyone tell me what I'm doing wrong? I know this should be relatively straightforward but as I say, I'm new to all this!!
Many thanks for any help you can offer me
Brian