Currency

Description

A currency field displays a value as a currency amount.

Events

All VBA field events function for a focusable currency field.

VBA usage

VBA uses a formatted string value when referencing a currency field. The value can have a maximum of 14 characters to the left of a decimal separator and 5 to the right.

When you set a currency value, specify the location of the decimal separator; the accounting system automatically provides all other formatting. When you return a currency value, VBA returns the formatted string value that appears in the window, including the currency symbol, thousands separator and the decimal separator.

Example

The following VBA code defaults the value of a currency field to a fixed amount in the Checkbook Maintenance window:

Private Sub CheckbookID_AfterUserChanged()
	If NextCheckNumber = 1 Then
		'This is a new checkbook. 
		'Set the max check amount to $2,000.00
		Amount = "2000.00"
	End If
End Sub


Documentation Feedback