1 2 unit Unit1; 3 { 4 This code will properly check to see if MS access is properly installed on 5 A PC checking the registry is not good because there are cases where an 6 application does not install or uninstall properly. 7 } 8 interface 9 10 uses 11 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 12 Dialogs, OleServer, Access2000, StdCtrls; 13 14 type 15 TForm1 = class(TForm) 16 Button1: TButton; 17 procedure Button1Click(Sender: TObject); 18 private 19 { Private declarations } 20 public 21 { Public declarations } 22 end; 23 24 var 25 Form1: TForm1; 26 27 implementation 28 29 {$R *.dfm} 30 31 procedure TForm1.Button1Click(Sender: TObject); 32 var 33 AccessTest :TAccessApplication; 34 bInstalled:boolean; 35 begin 36 bInstalled:=true; 37 try 38 AccessTest :=TAccessApplication.Create(self); 39 AccessTest.Connect; 40 except on E:Exception do begin 41 bInstalled:=false; 42 end; 43 44 end; 45 if bInstalled then 46 showmessage('MS Access is installed') 47 else 48 showmessage('MS Access is NOT installed') 49 50 end; 51 52 end.