最適化

  Access 2002 より前



対象 MDB を選択するダイアログが表示されます。
Access 2003 以降では、CompactRepair メソッド が使用できるようです


  
Call DoCompact()

function DoCompact()

	Dim Acc

	on error resume next
	Set Acc = CreateObject("Access.Application")
	Acc.RunCommand 4
	Acc.Quit
	on error goto 0

end function
  



  その他のコマンド定数



以下の定数をスクリプト内で使用する方法は こちら を参照して下さい

  
enum AcCommand
{
    acCmdWindowUnhide = 1,
    acCmdWindowHide = 2,
    acCmdExit = 3,
    acCmdCompactDatabase = 4,
    acCmdEncryptDecryptDatabase = 5,
    acCmdRepairDatabase = 6,
    acCmdMakeMDEFile = 7,
    acCmdMoreWindows = 8,
    acCmdAppRestore = 9,
    acCmdAppMaximize = 10,
    acCmdAppMinimize = 11,
    acCmdAppMove = 12,
    acCmdAppSize = 13,
    acCmdDocRestore = 14,
    acCmdDocMaximize = 15,
    acCmdDocMove = 16,
    acCmdDocSize = 17,
    acCmdRefresh = 18,
    acCmdFont = 19,
    acCmdSave = 20,
    acCmdSaveAs = 21,
    acCmdWindowCascade = 22,
    acCmdTileVertically = 23,
    acCmdWindowArrangeIcons = 24,
    acCmdOpenDatabase = 25,
    acCmdNewDatabase = 26,
    acCmdOLEDDELinks = 27,
    acCmdRecordsGoToNew = 28,
    acCmdReplace = 29,
    acCmdFind = 30,
    acCmdRunMacro = 31,
    acCmdPageSetup = 32,
    acCmdInsertObject = 33,
    acCmdDuplicate = 34,
    acCmdAboutMicrosoftAccess = 35,
    acCmdFormHdrFtr = 36,
    acCmdReportHdrFtr = 37,
    acCmdPasteAppend = 38,
    acCmdInsertFile = 39,
    acCmdSelectForm = 40,
    acCmdTabOrder = 41,
    acCmdFieldList = 42,
    acCmdAlignLeft = 43,
    acCmdAlignRight = 44,
    acCmdAlignTop = 45,
    acCmdAlignBottom = 46,
    acCmdAlignToGrid = 47,
    acCmdSizeToGrid = 48,
    acCmdOptions = 49,
    acCmdSelectRecord = 50,
    acCmdSortingAndGrouping = 51,
    acCmdBringToFront = 52,
    acCmdSendToBack = 53,
    acCmdPrintPreview = 54,
    acCmdApplyDefault = 55,
    acCmdSetControlDefaults = 56,
    acCmdOLEObjectDefaultVerb = 57,
    acCmdClose = 58,
    acCmdSizeToFit = 59,
    acCmdDocMinimize = 60,
    acCmdViewRuler = 61,
    acCmdSnapToGrid = 62,
    acCmdViewGrid = 63,
    acCmdPasteSpecial = 64,
    acCmdRecordsGoToNext = 65,
    acCmdRecordsGoToPrevious = 66,
    acCmdRecordsGoToFirst = 67,
    acCmdRecordsGoToLast = 68,
    acCmdSizeToFitForm = 69,
    acCmdEditingAllowed = 70,
    acCmdClearGrid = 71,
    acCmdJoinProperties = 72,
    acCmdQueryTotals = 73,
    acCmdQueryTypeCrosstab = 74,
    acCmdTableNames = 75,
    acCmdQueryParameters = 76,
    acCmdFormatCells = 77,
    acCmdDataEntry = 78,
    acCmdHideColumns = 79,
    acCmdUnhideColumns = 80,
    acCmdDeleteQueryColumn = 81,
    acCmdInsertQueryColumn = 82,
    acCmdRemoveTable = 84,
    acCmdViewToolbox = 85,
    acCmdMacroNames = 86,
    acCmdMacroConditions = 87,
    acCmdSingleStep = 88,
    acCmdQueryTypeSelect = 89,
    acCmdQueryTypeUpdate = 90,
    acCmdQueryTypeAppend = 91,
    acCmdQueryTypeDelete = 92,
    acCmdApplyFilterSort = 93,
    acCmdQueryTypeMakeTable = 94,
    acCmdLoadFromQuery = 95,
    acCmdSaveAsQuery = 96,
    acCmdSaveRecord = 97,
    acCmdAdvancedFilterSort = 99,
    acCmdMicrosoftAccessHelpTopics = 100,
    acCmdLinkTables = 102,
    acCmdUserAndGroupPermissions = 103,
    acCmdUserAndGroupAccounts = 104,
    acCmdFreezeColumn = 105,
    acCmdUnfreezeAllColumns = 106,
    acCmdPrimaryKey = 107,
    acCmdSubformDatasheet = 108,
    acCmdSelectAllRecords = 109,
    acCmdViewTables = 110,
    acCmdViewQueries = 111,
    acCmdViewForms = 112,
    acCmdViewReports = 113,
    acCmdViewMacros = 114,
    acCmdViewModules = 115,
    acCmdRowHeight = 116,
    acCmdColumnWidth = 117,
    acCmdInsertFileIntoModule = 118,
    acCmdSaveModuleAsText = 119,
    acCmdFindPrevious = 120,
    acCmdWindowSplit = 121,
    acCmdProcedureDefinition = 122,
    acCmdDebugWindow = 123,
    acCmdReset = 124,
    acCmdCompileAllModules = 125,
    acCmdCompileAndSaveAllModules = 126,
    acCmdGoContinue = 127,
    acCmdStepOver = 128,
    acCmdSetNextStatement = 129,
    acCmdShowNextStatement = 130,
    acCmdToggleBreakpoint = 131,
    acCmdClearAllBreakpoints = 132,
    acCmdRelationships = 133,
    acCmdNewObjectTable = 134,
    acCmdNewObjectQuery = 135,
    acCmdNewObjectForm = 136,
    acCmdNewObjectReport = 137,
    acCmdNewObjectMacro = 138,
    acCmdNewObjectModule = 139,
    acCmdNewObjectClassModule = 140,
    acCmdLayoutPreview = 141,
    acCmdSaveAsReport = 142,
    acCmdRename = 143,
    acCmdRemoveFilterSort = 144,
    acCmdSaveLayout = 145,
    acCmdClearAll = 146,
    acCmdHideTable = 147,
    acCmdShowDirectRelationships = 148,
    acCmdShowAllRelationships = 149,
    acCmdCreateRelationship = 150,
    acCmdEditRelationship = 151,
    acCmdIndexes = 152,
    acCmdAlignToShortest = 153,
    acCmdAlignToTallest = 154,
    acCmdSizeToNarrowest = 155,
    acCmdSizeToWidest = 156,
    acCmdHorizontalSpacingMakeEqual = 157,
    acCmdHorizontalSpacingDecrease = 158,
    acCmdHorizontalSpacingIncrease = 159,
    acCmdVerticalSpacingMakeEqual = 160,
    acCmdVerticalSpacingDecrease = 161,
    acCmdVerticalSpacingIncrease = 162,
    acCmdSortAscending = 163,
    acCmdSortDescending = 164,
    acCmdToolbarsCustomize = 165,
    acCmdOLEObjectConvert = 167,
    acCmdQueryTypeSQLDataDefinition = 168,
    acCmdQueryTypeSQLPassThrough = 169,
    acCmdViewCode = 170,
    acCmdConvertDatabase = 171,
    acCmdCallStack = 172,
    acCmdSend = 173,
    acCmdOutputToExcel = 175,
    acCmdOutputToRTF = 176,
    acCmdOutputToText = 177,
    acCmdInvokeBuilder = 178,
    acCmdZoomBox = 179,
    acCmdQueryTypeSQLUnion = 180,
    acCmdRun = 181,
    acCmdPageHdrFtr = 182,
    acCmdDesignView = 183,
    acCmdSQLView = 184,
    acCmdShowTable = 185,
    acCmdCloseWindow = 186,
    acCmdInsertRows = 187,
    acCmdDeleteRows = 188,
    acCmdCut = 189,
    acCmdCopy = 190,
    acCmdPaste = 191,
    acCmdAutoDial = 192,
    acCmdNewObjectAutoForm = 193,
    acCmdNewObjectAutoReport = 194,
    acCmdWordMailMerge = 195,
    acCmdTestValidationRules = 196,
    acCmdControlWizardsToggle = 197,
    acCmdEnd = 198,
    acCmdRedo = 199,
    acCmdObjectBrowser = 200,
    acCmdAddWatch = 201,
    acCmdEditWatch = 202,
    acCmdQuickWatch = 203,
    acCmdStepToCursor = 204,
    acCmdIndent = 205,
    acCmdOutdent = 206,
    acCmdFilterByForm = 207,
    acCmdFilterBySelection = 208,
    acCmdViewLargeIcons = 209,
    acCmdViewDetails = 210,
    acCmdViewSmallIcons = 211,
    acCmdViewList = 212,
    acCmdLineUpIcons = 213,
    acCmdArrangeIconsByName = 214,
    acCmdArrangeIconsByType = 215,
    acCmdArrangeIconsByCreated = 216,
    acCmdArrangeIconsByModified = 217,
    acCmdArrangeIconsAuto = 218,
    acCmdCreateShortcut = 219,
    acCmdToggleFilter = 220,
    acCmdOpenTable = 221,
    acCmdInsertPicture = 222,
    acCmdDeleteRecord = 223,
    acCmdStartupProperties = 224,
    acCmdPageNumber = 225,
    acCmdDateAndTime = 226,
    acCmdChangeToTextBox = 227,
    acCmdChangeToLabel = 228,
    acCmdChangeToListBox = 229,
    acCmdChangeToComboBox = 230,
    acCmdChangeToCheckBox = 231,
    acCmdChangeToToggleButton = 232,
    acCmdChangeToOptionButton = 233,
    acCmdChangeToImage = 234,
    acCmdAnswerWizard = 235,
    acCmdMicrosoftOnTheWeb = 236,
    acCmdClearItemDefaults = 237,
    acCmdZoom200 = 238,
    acCmdZoom150 = 239,
    acCmdZoom100 = 240,
    acCmdZoom75 = 241,
    acCmdZoom50 = 242,
    acCmdZoom25 = 243,
    acCmdZoom10 = 244,
    acCmdFitToWindow = 245,
    acCmdPreviewOnePage = 246,
    acCmdPreviewTwoPages = 247,
    acCmdPreviewFourPages = 248,
    acCmdPreviewEightPages = 249,
    acCmdPreviewTwelvePages = 250,
    acCmdOpenURL = 251,
    acCmdOpenStartPage = 252,
    acCmdOpenSearchPage = 253,
    acCmdRegisterActiveXControls = 254,
    acCmdDeleteTab = 255,
    acCmdDatabaseProperties = 256,
    acCmdImport = 257,
    acCmdInsertActiveXControl = 258,
    acCmdInsertHyperlink = 259,
    acCmdReferences = 260,
    acCmdAutoCorrect = 261,
    acCmdInsertProcedure = 262,
    acCmdCreateReplica = 263,
    acCmdSynchronizeNow = 264,
    acCmdRecoverDesignMaster = 265,
    acCmdResolveConflicts = 266,
    acCmdDeleteWatch = 267,
    acCmdSpelling = 269,
    acCmdAutoFormat = 270,
    acCmdDeleteTableColumn = 271,
    acCmdInsertTableColumn = 272,
    acCmdInsertLookupColumn = 273,
    acCmdRenameColumn = 274,
    acCmdSetDatabasePassword = 275,
    acCmdUserLevelSecurityWizard = 276,
    acCmdFilterExcludingSelection = 277,
    acCmdQuickPrint = 278,
    acCmdConvertMacrosToVisualBasic = 279,
    acCmdSaveAllModules = 280,
    acCmdFormView = 281,
    acCmdDatasheetView = 282,
    acCmdAnalyzePerformance = 283,
    acCmdAnalyzeTable = 284,
    acCmdDocumenter = 285,
    acCmdTileHorizontally = 286,
    acCmdProperties = 287,
    acCmdTransparentBackground = 288,
    acCmdTransparentBorder = 289,
    acCmdCompileLoadedModules = 290,
    acCmdInsertLookupField = 291,
    acCmdUndo = 292,
    acCmdInsertChart = 293,
    acCmdGoBack = 294,
    acCmdGoForward = 295,
    acCmdStopLoadingPage = 296,
    acCmdRefreshPage = 297,
    acCmdFavoritesOpen = 298,
    acCmdFavoritesAddTo = 299,
    acCmdShowOnlyWebToolbar = 300,
    acCmdToolbarControlProperties = 301,
    acCmdShowMembers = 302,
    acCmdListConstants = 303,
    acCmdQuickInfo = 304,
    acCmdParameterInfo = 305,
    acCmdCompleteWord = 306,
    acCmdBookmarksToggle = 307,
    acCmdBookmarksNext = 308,
    acCmdBookmarksPrevious = 309,
    acCmdBookmarksClearAll = 310,
    acCmdStepOut = 311,
    acCmdFindPrevWordUnderCursor = 312,
    acCmdFindNextWordUnderCursor = 313,
    acCmdObjBrwFindWholeWordOnly = 314,
    acCmdObjBrwShowHiddenMembers = 315,
    acCmdObjBrwHelp = 316,
    acCmdObjBrwViewDefinition = 317,
    acCmdObjBrwGroupMembers = 318,
    acCmdSelectReport = 319,
    acCmdPublish = 320,
    acCmdSaveAsHTML = 321,
    acCmdSaveAsIDC = 322,
    acCmdSaveAsASP = 323,
    acCmdPublishDefaults = 324,
    acCmdEditHyperlink = 325,
    acCmdOpenHyperlink = 326,
    acCmdOpenNewHyperlink = 327,
    acCmdCopyHyperlink = 328,
    acCmdHyperlinkDisplayText = 329,
    acCmdTabControlPageOrder = 330,
    acCmdInsertPage = 331,
    acCmdDeletePage = 332,
    acCmdSelectAll = 333,
    acCmdCreateMenuFromMacro = 334,
    acCmdCreateToolbarFromMacro = 335,
    acCmdCreateShortcutMenuFromMacro = 336,
    acCmdDelete = 337,
    acCmdRunOpenMacro = 338,
    acCmdLastPosition = 339,
    acCmdPrint = 340,
    acCmdFindNext = 341,
    acCmdStepInto = 342,
    acCmdClearHyperlink = 343,
    acCmdDataAccessPageBrowse = 344,
    acCmdNewObjectDataAccessPage = 346,
    acCmdSelectDataAccessPage = 347,
    acCmdViewDataAccessPages = 349,
    acCmdNewObjectView = 350,
    acCmdNewObjectStoredProcedure = 351,
    acCmdNewObjectDiagram = 352,
    acCmdViewFieldList = 353,
    acCmdViewDiagrams = 354,
    acCmdViewStoredProcedures = 355,
    acCmdViewViews = 356,
    acCmdViewShowPaneSQL = 357,
    acCmdViewShowPaneDiagram = 358,
    acCmdViewShowPaneGrid = 359,
    acCmdViewVerifySQL = 360,
    acCmdQueryGroupBy = 361,
    acCmdQueryAddToOutput = 362,
    acCmdViewTableColumnNames = 363,
    acCmdViewTableNameOnly = 364,
    acCmdHidePane = 365,
    acCmdRemove = 366,
    acCmdViewTableColumnProperties = 368,
    acCmdViewTableKeys = 369,
    acCmdViewTableUserView = 370,
    acCmdZoomSelection = 371,
    acCmdDiagramNewLabel = 372,
    acCmdDiagramAddRelatedTables = 373,
    acCmdDiagramShowRelationshipLabels = 374,
    acCmdDiagramModifyUserDefinedView = 375,
    acCmdDiagramViewPageBreaks = 376,
    acCmdDiagramRecalculatePageBreaks = 377,
    acCmdDiagramAutosizeSelectedTables = 378,
    acCmdDiagramLayoutSelection = 379,
    acCmdDiagramLayoutDiagram = 380,
    acCmdDiagramNewTable = 381,
    acCmdDiagramDeleteRelationship = 382,
    acCmdConnection = 383,
    acCmdEditTriggers = 384,
    acCmdDataAccessPageDesignView = 385,
    acCmdPromote = 386,
    acCmdGroupByTable = 387,
    acCmdDemote = 388,
    acCmdSaveAsDataAccessPage = 389,
    acCmdMicrosoftScriptEditor = 390
};
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加




SQLの窓  天気  IT用語辞典
Yahoo!ニュース  マルチ辞書
PHP マニュアル  Google URL短縮 


フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ