vage78
asked on
Validation in a data entry form
I want to know what is a typical code of validation for a data entry form and in which event I must attach it.
For example I have my form has fields
numeric-integer,real numbers,alphanumeric-strin g 20 and some of them I want to be required.
Usually I use a DBgrid component for data entry is this right? if not what is better way and which code is necessary.
If is possible to have an example.
For example I have my form has fields
numeric-integer,real numbers,alphanumeric-strin
Usually I use a DBgrid component for data entry is this right? if not what is better way and which code is necessary.
If is possible to have an example.
You can put validation in the Paradox table, for example maximum value, minimum, and default values
Hi,
Just a little note here. From my point of view, I wouldn't recommend to use a DBGrid for entering record information.
Personally I have creaded a template DB Form (from which all my DBForms inherit) with a PageControl which has at least 2 TabSheets. The first TabSheet (which is the RecordView) has a DBGrid which is Read Only. From this view the user can see all the records or he can filter the results. When double clicking on a record in the grid, the user gets the List View tabsheet on which he can edit the record using DataAware controls. Also when the user clicks on the Insert or Edit button of the TDBNavigater the ListView tabsheet is shown to the user.
Well, this is only my personal input on this matter, but IMHO (and I think some other experts will agree with me) you shouldn't use a DBGrid for editing or entering data.
Best regards,
Stefaan
Just a little note here. From my point of view, I wouldn't recommend to use a DBGrid for entering record information.
Personally I have creaded a template DB Form (from which all my DBForms inherit) with a PageControl which has at least 2 TabSheets. The first TabSheet (which is the RecordView) has a DBGrid which is Read Only. From this view the user can see all the records or he can filter the results. When double clicking on a record in the grid, the user gets the List View tabsheet on which he can edit the record using DataAware controls. Also when the user clicks on the Insert or Edit button of the TDBNavigater the ListView tabsheet is shown to the user.
Well, this is only my personal input on this matter, but IMHO (and I think some other experts will agree with me) you shouldn't use a DBGrid for editing or entering data.
Best regards,
Stefaan
ASKER
Edited text of question.
ASKER
Is it possible to have an example, Stefaan?
Hi,
Well, if you can supply me with an e-Mail adress, I could set up a little sample for you.
Well, if you can supply me with an e-Mail adress, I could set up a little sample for you.
ASKER
OK, Stefaan
my e-mail adress is billi200@hotmail.com
Thank you very much
my e-mail adress is billi200@hotmail.com
Thank you very much
Hi,
One more question, do you have the RxLib components ? My sample uses the grid from that library, but if you don't have the library, I'll use the default delphi DBGrid.
One more question, do you have the RxLib components ? My sample uses the grid from that library, but if you don't have the library, I'll use the default delphi DBGrid.
Just an opinion...
I mostly use grids for user input, especially Infopower grid with combo's etc embedded. For me, this gives the best use of screen 'real estate', and previous records shown in the grid prompt novice users as to what sort of data the grid is expecting (for new records.)
There, I've had my two cents worth... :-)
I mostly use grids for user input, especially Infopower grid with combo's etc embedded. For me, this gives the best use of screen 'real estate', and previous records shown in the grid prompt novice users as to what sort of data the grid is expecting (for new records.)
There, I've had my two cents worth... :-)
ASKER
Stefaan, I use the default DBGrid componenet.
Thanks
Thanks
ASKER
Stefaan, I use the default DBGrid componenet.
Thanks
Thanks
Hi,
Well I have sent a saple to your e-mail adress. It only contains the source code and is only 45 Kb.
If you have any questions, feel free to ask them.
Best regards,
Stefaan.
(Only use the second zip file, in the first I forgot to put the grid in ReadOnly)
Well I have sent a saple to your e-mail adress. It only contains the source code and is only 45 Kb.
If you have any questions, feel free to ask them.
Best regards,
Stefaan.
(Only use the second zip file, in the first I forgot to put the grid in ReadOnly)
We do not use grids for data entry. We use components such as TDBEdit and such. We actually derived from these and added an inputrequired published field (or you can use different tag values). On the before post you can cycle through the controls for that datasource and do your validation like required fields, validate the data...
Mark
Mark
ASKER
May I have a simple example, Mark.
Thank you
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Stefaan
Do you still want an example?
Mark
Mark
ASKER
Yes, Mark
But if you can it must be simple with input validation
bye
But if you can it must be simple with input validation
bye