Enable user to change currency format

S

Sammie

I have a form, frmPurchaseOrders, which generates a report, PurchaseOrder
with all currency in both form and report formatted for US dollars. Is there
a way to allow the user to select a different currency (Euros or Pounds for
example) on the form in order to format the currency as selected when
printing the PurchaseOrder report?
 
D

Damon Heron

On the form, you could do something like this, using an option frame for US,
British, or Euro inputmasks.

Private Sub Form_Load() 'this sets the textbox to the default input mask, US
Me.Text1.InputMask = "\$##,###.##;;_"
End Sub

Private Sub OptionFrame_Click() 'This allows the user to select between
US,Pounds,or Euro
Select Case OptionFrame.Value
Case 1
Me.Text1.InputMask = "\$##,###.##;;_"
'If there are multiple currency textboxes, then you would need to add
them to each case....
Case 2
Me.Text1.InputMask = "\" & Chr(163) & "##,###.##;;_"
Case 3
Me.Text1.InputMask = "\" & Chr(128) & "##,###.##;;_"
End Select
Me.Text1.Requery
End Sub

For the PO report, it might be simplest to just have 3 reports, each
formatted to a currency, and depending on which option the user selected on
the form, run that report.

Damon
 

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