[DUG] Validate data entry

Todd todd.martin.nz at gmail.com
Wed Jun 1 23:32:51 NZST 2011


Hi Wallace

Write a procedure for the validation routine in the DataModule. Then
call it from the OnKeyPress event in each form.

Todd.

> I'm entering quite a lot of data from different forms into a single database. I need to validate the data on each entry point on each form. 
> 
> If I use a OnKeyPress, I can write a routine to get what I want, but I would like to use the routine directly off the field in the DataModule and not on each form. 
> In the DM, the OnValidate only checks the data when it is about to be written which is too late. 
> 
> The main problems are numbers in the incorrect format ie 2 decimal points, or multiple signs etc. A maximum and minimum range would be a real bonus.
> 
> How do I do this ?
> 
> Thanks Wallace
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe


-- 
<b>Passion</b> is no substitute for <b>reason</b>


More information about the Delphi mailing list