Alhakeem1977
Registered User.
- Local time
- Tomorrow, 00:52
- Joined
- Jun 24, 2017
- Messages
- 308
Hi Guys,
I have got a textbox representing the amount depends on currency selection, I would like the format of the decimal places to be changed when I select:
1. USD then the decimal places would be 1,223.66
2. KWD then the decimal places would be 1,223.660
here is my code but it's not working:
Appreciate your suggestions.
I have got a textbox representing the amount depends on currency selection, I would like the format of the decimal places to be changed when I select:
1. USD then the decimal places would be 1,223.66
2. KWD then the decimal places would be 1,223.660
here is my code but it's not working:
Code:
Private Sub Form_Current()
On Error Resume Next
If Me.NoOfDigits = "3" Then
Me.txtAmount = Format([txtAmount], " #,###.000")
Else
If Me.NoOfDigits = "2" Then
Me.txtAmount = Format([txtAmount], " #,###.00")
End If
End If
End Sub
Appreciate your suggestions.