Hi all,
I am basically trying to concatinate a currency symbol to the value of a textbox BEFORE it is saved and I am being hit with the "Run-time error '2115'"
Here is the code:
Private Sub amount_BeforeUpdate(Cancel As Integer)
Select Case strCurrency
Case "CAD Dollar": strCurrency = Chr(36) & Amount.Text
Case "US Dollar": strCurrency = Chr(36) & Amount.Text
Case "UK Pound": strCurrency = Chr(163) & Amount.Text
Case "Euro": strCurrency = Chr(128) & Amount.Text
Case "L-Points": strCurrency = Amount.Text & "Points"
End Select
If MsgBox("Are you sure you want add this currency?", vbQuestion + vbYesNo) = vbNo Then
Me.Undo '-- Returns all of the controls to their original value
Cancel = True
Else
Amount.Value = strCurrency
End If
End Sub
Any tips here would be GREATLY appreciated.
Cheers,
Aaron
I am basically trying to concatinate a currency symbol to the value of a textbox BEFORE it is saved and I am being hit with the "Run-time error '2115'"
Here is the code:
Private Sub amount_BeforeUpdate(Cancel As Integer)
Select Case strCurrency
Case "CAD Dollar": strCurrency = Chr(36) & Amount.Text
Case "US Dollar": strCurrency = Chr(36) & Amount.Text
Case "UK Pound": strCurrency = Chr(163) & Amount.Text
Case "Euro": strCurrency = Chr(128) & Amount.Text
Case "L-Points": strCurrency = Amount.Text & "Points"
End Select
If MsgBox("Are you sure you want add this currency?", vbQuestion + vbYesNo) = vbNo Then
Me.Undo '-- Returns all of the controls to their original value
Cancel = True
Else
Amount.Value = strCurrency
End If
End Sub
Any tips here would be GREATLY appreciated.
Cheers,
Aaron