Need currency formatting on a SUM for cells

Hi!

There’s a trick where you can limit text entry in a field to only keystrokes that you choose. The attached file will allow only numbers, the period, and the comma. (It also allows the keystrokes that let you arrow left and right, copy, paste, etc.)

(Paste the field into your file, then copy the OnKeyDown handler and paste it onto your existing field.)

The technique is explained here.

numbers_only_field.rp (58.0 KB)

That said, you can still get not-a-number errors if the user enters something like “0,…1”, so you may want to do some error checking (e.g., test if the sum value equals “NaN” before placing it in the field).