Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flag (I think)

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
US
I have a db that has clients who we bill. Visa and Mastercard have a reason code system. Based on the Reason code we can bill for how much work is put into the Reason code generated by a charge back (Credit Card Stuff).
Any way the fees are as follows
FeeCode FeeAmnt
A $0.00
B $3.00
C $8.00
D $12.00
E $20.00


Each Reason Code has a letter assigned to it which generates the fee and allows me to bill.

Now my problem.
Most of the banks we deal with will have the same price per reason code except six. The only difference with those six is where a reason code would have the E $20.00 fee applied they have the D $12.00 fee applied. No other banks will ever be charged $12.00 it is only the six banks.

My Idea:
I thought of somehow have a flag on those banks like a yes/no feild.
I would then make a If/then statement in the query that would go like this

If E and ([Exception] = yes) then D

I do not know how I would do this.
Please give suggestions please.
 
If you're using a query you can't use IF..THEN, try an IIF statement...

iif([Exception]=Yes, D, E)

You can look up the IIF function criteria in the help files if necessary.
 
I am going to eloborate on my info I think what I gave you was to vague.

DataBase:
ChargeBack

Tables:
-tblClient-Contains all Client info
-tblMerchant-Contains all Merchant Info
-tblChargeBack-Table where all new work is entered
-tblCardType-Contains info on MasterCard and Visa
-tblRSNCode-Contains reason code definitions and fee code that goes applies with code
-tblFee-Contains Fee code and dollar amount


Queries:
-qryChargeBack-Contains tblChargeBack but with some left and mid functions to pull numbers out of larger numbers
-qryBilling-Contains the info from qryChargeback and tables.

The RSN code is to be linked to the Fee Code but I need all E Codes to be changed to D but only if there is Yes in the exception field in the tblClient.

I tried the code and it left out everything that was not D and then changed all D to E.

When this is done all the fees per month will be allocated and billed to the bank.

If there is a way to do this please be descriptive.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top