M
Maury Markowitz
My forms have many fields where users are typing in large numbers, like
"three million". It's very easy for them to leave off a zero, and get the
number wrong, yet this error isn't very easy to spot.
I would like to add a way that that can type "m" for million, and "t" for
thousand. The system will then replace the t or m with the appropriate number
of zeros. This way the user can type "3m" and get the right value every time.
h would give a hundred, so typing "3ht" would add two zeros and then three,
making a hundred thousand.
I'm having trouble writing this function. I tried attaching it to the
_Change message, but after I add the zeros and apply the change back to the
form that, of course, fires the _Change.
I suppose I could add it to the _KeyDown and manipulate the number, but this
would be difficult to add to every single field in the entire app.
I could also add it to my _AfterUpdate, but the problem is some of these
fields already have a macro attached to this event.
So is there some way to either...
1) make a custom formatter I could apply to all of these fields?
2) use a macro that could be applied to any field?
Thanks!
Maury
"three million". It's very easy for them to leave off a zero, and get the
number wrong, yet this error isn't very easy to spot.
I would like to add a way that that can type "m" for million, and "t" for
thousand. The system will then replace the t or m with the appropriate number
of zeros. This way the user can type "3m" and get the right value every time.
h would give a hundred, so typing "3ht" would add two zeros and then three,
making a hundred thousand.
I'm having trouble writing this function. I tried attaching it to the
_Change message, but after I add the zeros and apply the change back to the
form that, of course, fires the _Change.
I suppose I could add it to the _KeyDown and manipulate the number, but this
would be difficult to add to every single field in the entire app.
I could also add it to my _AfterUpdate, but the problem is some of these
fields already have a macro attached to this event.
So is there some way to either...
1) make a custom formatter I could apply to all of these fields?
2) use a macro that could be applied to any field?
Thanks!
Maury