unit uCopyTable;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, 
  Buttons, ExtCtrls, Dialogs;

type
  TfrmCopyTable = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    Bevel1: TBevel;
    Label2: TLabel;
    eTableName: TEdit;
    rbCurrentDb: TRadioButton;
    rbSelectedDb: TRadioButton;
    lDbFile: TLabel;
    eDbFileName: TEdit;
    btnDbFileSelect: TButton;
    odOpenDatabase: TOpenDialog;
    procedure rbCurrentDbClick(Sender: TObject);
    procedure rbSelectedDbClick(Sender: TObject);
    procedure btnDbFileSelectClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCopyTable: TfrmCopyTable;

implementation

{$R *.dfm}

procedure TfrmCopyTable.rbCurrentDbClick(Sender: TObject);
begin
  eDbFileName.Enabled := False;
  btnDbFileSelect.Enabled := False;
  lDbFile.Enabled := False;
end;

procedure TfrmCopyTable.rbSelectedDbClick(Sender: TObject);
begin
  eDbFileName.Enabled := True;
  btnDbFileSelect.Enabled := True;
  lDbFile.Enabled := True;
end;

procedure TfrmCopyTable.btnDbFileSelectClick(Sender: TObject);
begin
  if odOpenDatabase.Execute then
    eDbFileName.Text := odOpenDatabase.FileName;
end;

end.
