I have created the following function in VBA to run as an Event Procedure for the Fee1 field in a form... however... noting is showing up in the field... what am I doing wrong??? Here's the code I wrote:
Private Function Fee1_BeforeUpdate(Cancel As Currency)
If ManagedAssetValue >= 10000 <= 250000 Then
Fee1 = ManagedAssetValue * 0.02
ElseIf ManagedAssetValue >= 250001 <= 500000 Then
Fee1 = ((250000 * 0.02) + ((ManagedAssetValue - 250000) * 0.015))
ElseIf ManagedAssetValue >= 500001 Then
Fee1 = ((250000 * 0.02) + (250000 * 0.015) + ((ManagedAssetValue - 500000) * 0.01))
End If
End Function
Does the code need to be on the Control Source of the field for it to show up? Help! Thanks...
Alissa
Private Function Fee1_BeforeUpdate(Cancel As Currency)
If ManagedAssetValue >= 10000 <= 250000 Then
Fee1 = ManagedAssetValue * 0.02
ElseIf ManagedAssetValue >= 250001 <= 500000 Then
Fee1 = ((250000 * 0.02) + ((ManagedAssetValue - 250000) * 0.015))
ElseIf ManagedAssetValue >= 500001 Then
Fee1 = ((250000 * 0.02) + (250000 * 0.015) + ((ManagedAssetValue - 500000) * 0.01))
End If
End Function
Does the code need to be on the Control Source of the field for it to show up? Help! Thanks...
Alissa