[AccessD] Currency symbols

Stuart McLachlan stuart at lexacorp.com.pg
Thu Nov 26 15:07:58 CST 2009


I'd create a function

CurrDisplay(amount as Currency,CustCurrency as string) as string
Select case UCase$(CustCurrency)
     Case "USD"
          CurrDisplay = format(amount,"$#,###.00")
     Case "EUR"
         CurrDisplay = format(amount,"EUR#,###.00")
     Case Else
         CurrrDisplay =  format(amount,"#,###.00")
End Select
End Function

Then  make each textbox
=CurrDisplay(POVAlue,CustCurrency)

Not only that, but it becomes trivial to maintain when they want to add Yen, Remnibi or 
whatever later 

-- 
Stuart

On 26 Nov 2009 at 8:46, Doug Steele wrote:

> I've just had a request to change a purchase order database to allow
> printing of Euro currency as required.  My first crack at this is to do the
> following in each currency text box on the printout:
> 
> =iif(CustCurrency="USD",format(POValue,"$#,###.00"),format(POValue,"EUR#,###.00")
> 
> (I hope the Euro sign came through in the second format string)
> 
> This is going to be a bit tedious - does anyone have a better method? Some
> reports will have to both both EUR and USD currencies, so I can't set
> anything before the report prints.
> 
> Doug Steele
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 






More information about the AccessD mailing list