Alhakeem1977
Registered User.
- Local time
- Today, 09:09
- Joined
- Jun 24, 2017
- Messages
- 308
Hi All,
I would like to return the account type if three scenarios are met:
1. If the [CustTypeID] = 1 and [CCNo] = "N/A" the result should be: Account File.
2. If the [CustTypeID] = 2 and [CCNo] = "N/A" the result should be: Facility File.
3. If the [CustTypeID] = 2 and [CCNo] <> "N/A" the result should be: Credit Card File.
As the below returns -1 in the Type field:
How can I achieve this in my query?
Thanks in advance!
I would like to return the account type if three scenarios are met:
1. If the [CustTypeID] = 1 and [CCNo] = "N/A" the result should be: Account File.
2. If the [CustTypeID] = 2 and [CCNo] = "N/A" the result should be: Facility File.
3. If the [CustTypeID] = 2 and [CCNo] <> "N/A" the result should be: Credit Card File.
As the below returns -1 in the Type field:
Code:
Type: IIf([CustTypeID]=1 And [CCNo]="N/A","Account File","Facility File") Or IIf([CustTypeID]=2 Or [CCNo]="N/A","Credit Card","Facility File")
How can I achieve this in my query?
Thanks in advance!