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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATA COMPARE TO UPDATE

Status
Not open for further replies.

GueGueBla

Technical User
Nov 18, 2002
15
ZA
I have which has the following table:

ACCT TYPE DEBIT CREDIT
EXPENSE WITHDRAWAL DEPOSIT
CURRENT ASSET DEPOSIT WITHDRAWAL
CURRENT LIABILITY WITHDRAWAL DEPOSIT
FIXED ASSET WITHDRWAL DEPOSIT
LONG TERM LIABILITY WITHDRAWAL DEPOSIT
REVENUE WITHDRAWAL DEPOSIT

The table above has the fieldnames in the first row. This is a table I created as areference table to help convert a simple accounting ledger into withdrawal/deposit frames based on cash flow, from the company's perspective.

There is another table which has the headings Debit and Credit in two of its fields, the field type however is numerical, as opposed to the text in the above. I would however like to update a table with either withdrwal or deposit based on whether the amount in the amount is entered in the ledger (either debit or credit). I am considering having a table which represents withdrawal/deposit in numerical values and be able to make the decision that way. I am not altogether sure if this is the correct direction to be taking. Please advise.
 
ACTION: IIf([00 Journal Entries]![Debit]=0,0,Switch([Accounts]![AccountTypeID]="EXPENSES","WITHDRAWAL",[Accounts]![AccountTypeID]="REVENUE","DEPOSIT",True,"NO MATCH"))

I have tried using the above expression to try and solve my problem. I have never used a switch or an IIF but got cues from some of the threads I have read here. So please let me know how I can fix the above expression, if possible to get the result that I want, or let me know the alternative I can use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top