home *** CD-ROM | disk | FTP | other *** search
- unit Main;
-
- { Program copyright (c) 1995 by Charles Calvert }
- { Project Name: RANGER2 }
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs,
- Messages, Classes, Graphics,
- Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls, Grids,
- DBGrids, DB, DBTables;
-
- type
- TForm1 = class(TForm)
- Table1: TTable;
- DataSource1: TDataSource;
- DBGrid1: TDBGrid;
- Panel1: TPanel;
- rb1000: TRadioButton;
- rb2000s: TRadioButton;
- rb3000s: TRadioButton;
- rb4000s: TRadioButton;
- rb5000s: TRadioButton;
- rb6000: TRadioButton;
- rb7000: TRadioButton;
- rb8000: TRadioButton;
- rb9000: TRadioButton;
- rb10000: TRadioButton;
- procedure RadioRange(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.RadioRange(Sender: TObject);
- var
- S: string;
- begin
- Table1.SetRangeStart;
- S := (Sender as TRadioButton).Caption;
- Table1.Fields[0].AsString := S;
- Table1.SetRangeEnd;
- Table1.Fields[0].AsString := IntToStr(StrToInt(S) + 1000);
- Table1.ApplyRange;
- end;
-
- end.
-