aha.... so the solution might look like this: #include <GUIConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Example() Func Example() Local $dbname = FileOpenDialog("Choose Access Database", @ScriptDir, "Access files (*.accdb)", 1) If @error then Return SetError(@error, @extended, 0) $adoCon = ObjCreate("ADODB.Connecti