Jacob...I realized my solution was posted in another
thread, so I've included it below... Rick
----------------------------------------------------------------------------
-------------------
What seems to have covered all the bases in
my situation is to run two error traps:
Not Len(Trim(Form.Amount))
- Catches empty formfields
Len(Trim(Form.Ammount)) and Not IsNumeric(REReplace(Form.Premium,
"[.$,]","","All"))>
- This code makes sure there is data in the field
- Allows for $ , . to be entered, but stripped out. This is important
because many times for dollar amounts, those characters are used
and should not trigger an error for the user
- Catches data entered into the field which is just a garbage entry,
such as oweinfe9, does not assign it a value as using VAL would,
but doesn't accept this garbage entry by stripping out all the
non-numeric
characters and turning the entry into $9.00, for example
- It would catch the entry as incorrect, redisplay the entry in the
formfield
for the user to inspect and allow changes
- By using this line of code, I can also redisplay the entry in
DollarFormat
for the user, then have the $., stripped back out by this line for
processing
Those two trapping statements seems to cover all the bases, but it's hard to
anticipate everything someone might throw in a formfield.
Rick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234613
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54