can I change the format of each detail in a report based on the c.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to change the currency format of values in report details based
on the country of origin, i.e. pd sterling or dollar signs, using the country
field to force the event, is there a VBA process to do this?
 
Create a small lookup table to hold the possible currencies you cope with.
it will have 3 fields:
CurrencyID Primary key
CurFormat Text

The table will contain records such as:
US Dollar $#,##0.00; ($#,##0.00)
UK Pound £#,##0.00; (£#,##0.00)

Your main table will have fields:
CurrencyID Foreign key to tblCurrency.CurrencyID
Amount Actual amount (stored in Currency type field).

Include the lookup table in the query that is the RecordSource of your
report, so you have the CurFormat field. Then in the report, set the
ControlSource of your text box to:
=Format([Amount], [CurFormat])
 
Back
Top