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

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?
 
A

Allen Browne

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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top