Help: EditMask

Help: EditMask

Post by Jim and Gail Rei » Sun, 11 May 1997 04:00:00



Greetings --

I have a TDateTimeField named COMP_DATE (Completed Date) with the
following properties:

EditMask:       !99/99/00;1;_
Required:       False

The user access to this field is EditCOMP_DATE, a TDBEdit.

If I enter a date into EditCOMP_DATE by "mistake," and then try to
delete the date, I am
"rewarded with" an DBEditError Error:  "Invalid input value.  Use escape
key to Abandon
changes."  Earlier, I was getting an EConvertError:  "'  /  /  ' is not
a valid date."

How do I (More importantly, or my customer!) recover from an error?

I'm looking at an Oracle database at work, but I'm getting the same
general results at
home with Interbase.

Thanks,

Jim

 
 
 

1. EditMask & InputValidation help wanted

I'd like some help on the following two items:

1. On a 'DBEdit', related to a date-field, i have an EditMask like
'99/99/9999;1; ', with a ShortDateFormat like 'dd/mm/yyyy'. It is
working fine, but for one thing. Is does not allow me to enter an empty
value. When the field is originally empty is does not complain, but when
it isn't and i want to make it empty (clear) is does not allow me to.
Is there a way to enable this also?

2. What is the preferred (?) way to have a string-field-edit behave like
a fixed-floating type numeric?
What i mean is this. I want to enter some data (as a float) and let the
edit-control  (when i exit the control) adjust (round) the data to some
fixed number of decimals. I played some time with the function
FloatToStrF() in the OnValidate-function for the field in the dataset
(setting the fieldvalue or the edit-control-text-value) and it seems to
work during the OnValidate (on screen the editcontrol changes to the
wanted format), but when the next control gets focus eventually, the
editcontrol has changed back to exact the data i typed into it, with no
rounding or formatting what so ever.
I haven't figured this out, but my gut feeling says it should be easy.
Anyone figured this out for me?

Thanks in advance,

Oscar

2. Warning Message

3. EditMask in DB Field Problems

4. timeout on lock featurey

5. Editmask

6. Exporting to CSV/ODBC

7. EditMask

8. Does DB-Library provides encryption functionality?

9. EditMask problem

10. How to create a editmask by a numeric conversion

11. EditMask problem.

12. Display format and editmask

13. TField EditMask