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!

Credit / minus amounts

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
On the db i'm attempting to build I have a form for entering purchase invoices, the invoices are either purchase or credit notes, INV or CRE.
Could someone tell me how to get the data entry form,if the default value changes from INV to CRE, to return the data entered as a negative/minus/credit amount, and thus deduct the amount from the ongoing total.

Hope someone can help
Thanks
ern
 
firstly you must have broken down into a table the types of transactions; then in the query behind the form/report there must be a column for the transaction type, and then under the amount column use the IIF function to change the amount from a positive or negative. Access will automatially add all numbers. So the function in the Field line of the Amount column would read

Amount: IIf([TransactionType]="INV" Or [TransactionType]="CRE",[Amount]*-1,[Amount])

this assumes that Amount is the name of the field where the $ amount resides

this will place a minus sign in front of the amount which then the report subtracts when it is totalling.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top