Friday, October 12, 2007

How to create the Search button

How to create the Search button

To create the Search button

Step 1

To create the search button, the first thing you need to do is to add the Button in the Form1 and then rename the Caption to Search.

Step 2

Next, just double click the Button to show the Code Explorer Window and then set the Program as followed;

  1. var
  2. idno:string;
  3. find:boolean;
  4. begin
  5. idno:=inputbox(' Enter the Stuent No',
  6. ' Enter the No ','9732001');
  7. Table1.SetKey;
  8. Table1.Fields[0].AsString:=idno;
  9. find:=table1.GotoKey;
  10. if not find then
  11. ShowMessage(' No this Record ');
  12. end;

No comments: