Differentiating between poss & neg amounts

mu

Registered User.
Local time
Today, 06:44
Joined
May 22, 2002
Messages
18
I am attempting to design a data entry form for entering purchase invoices / credit notes.
Most entries are purchase invoices so my default invoice type is INV ( pur invoice). This is no problem and is working well.
I am having trouble however when the default is changed to CRE (credit note). What syntax can I use to get the form to recognise when the default on each entry line is changed so the amount entered is displayed as a negative amount (ie £-1,234.00), also will the amount be deducted from the ongoing invoice entered total and be stored in the underlying table as a credit amount.
Is it possible to get the colour of entered data to change to red to signify a credit amount ?

Hope someone may be able to help

Thanks

Martin
 
I think you can set this format:

[red]\-###0,00

to show red (don´t remember exactly, try it!)

As for the other question, I probably missunderstand you, but anyway:

Can´t you just use if/then calculation?

if [defaultfield]=cre then [amountfield]=[amountfield]*-1

Fuga.
 
£#,##0.00[Black];£#,##0.00[Red]
 
Thanks to both Fuga and Rich, the code Rich posted works fine.
I think I may have been complicating things in my original idea.
 

Users who are viewing this thread

Back
Top Bottom