nikeloeleven
Programmer
Hi there...
I have a program in Delphi and an Interbase database linked... I have a datamodule (called unitDataModMain) where i keep the Interbase data connections....
I have a table called "Pupil" (the table connection is called tblPupil) which stores the details of pupils:
Amission Number
Forename
Surname
FormTutor
What I want to do is to be able to create a form that allows users to search for records within this Pupil table.
I will have a text box.... users will enter the data they want to search in this field
and on the click of a button... the TBDGRID (connected to tblPupil) should locate to the record with the data entered into the text box::: I know that the code added into the button could be something like this:
<table name>.Locate(<field string>,<search value>,<option set>);
Please help me on how to solve this problem...
Also... do you have any idea how i can search for a field in the tblPupil table and display the other feilds from that record into text boxes...
So for example, I could search for an Admission Number (e.g. admission number A11000) by typing the admission number into a text box... and on the click of a button... the fields of the rest of the record are shown on other text feilds such as the pupil number A11000's surname, forename and formtutor .... etc...?
Thanks a lot for your time ....
I really appreciate it.. thanks...
I have a program in Delphi and an Interbase database linked... I have a datamodule (called unitDataModMain) where i keep the Interbase data connections....
I have a table called "Pupil" (the table connection is called tblPupil) which stores the details of pupils:
Amission Number
Forename
Surname
FormTutor
What I want to do is to be able to create a form that allows users to search for records within this Pupil table.
I will have a text box.... users will enter the data they want to search in this field
and on the click of a button... the TBDGRID (connected to tblPupil) should locate to the record with the data entered into the text box::: I know that the code added into the button could be something like this:
<table name>.Locate(<field string>,<search value>,<option set>);
Please help me on how to solve this problem...
Also... do you have any idea how i can search for a field in the tblPupil table and display the other feilds from that record into text boxes...
So for example, I could search for an Admission Number (e.g. admission number A11000) by typing the admission number into a text box... and on the click of a button... the fields of the rest of the record are shown on other text feilds such as the pupil number A11000's surname, forename and formtutor .... etc...?
Thanks a lot for your time ....
I really appreciate it.. thanks...