E.25. Other Helpful Information

We've provided you with a lot of information about the Access object model in this appendix. In addition to the basic objects you'll manipulate on a daily basis, you'll need to know some of the myriad of arguments you can use with some of these objects. The following tables detail some of the arguments for a few selected objects and methods.

E.25.1. Application.SetOption Method

The SetOption method of the Application object allows you to control all of the options you can see by selecting Tools | Options from the main Access window. The following tables detail the string arguments for the options available on each tab. For example, to control the visibility of the Status Bar within your Access application, you'd use the following code.

Application.SetOption "Show Status Bar", True

The arguments you'll need to manipulate the SetOption method are broken down by the tab of the Options dialog box on which they appear.

E.25.1.1. View Tab
Option textString argument
Show, Status barShow Status Bar
Show, Startup Task PaneShow Startup Dialog Box
Show, New object shortcutsShow New Object Shortcuts
Show, Hidden objectsShow Hidden Objects
Show, System objectsShow System Objects
Show, Windows in TaskbarShowWindowsInTaskbar
Show in Macro Design, Names columnShow Macro Names Column
Show in Macro Design, Conditions columnShow Conditions Column
Click options in database windowDatabase Explorer Click Behavior

E.25.1.2. General Tab
Option textString argument
Print margins, Left marginLeft Margin
Print margins, Right marginRight Margin
Print margins, Top marginTop Margin
Print margins, Bottom marginBottom Margin
Use four-year digit year formatting, This databaseFour-Digit Year Formatting
Use four-year digit year formatting, All databasesFour-Digit Year Formatting All Databases
Name AutoCorrect, Track name AutoCorrect infoTrack Name AutoCorrect Info
Name AutoCorrect, Perform name AutoCorrectPerform Name AutoCorrect
Name AutoCorrect, Log name AutoCorrect changesLog Name AutoCorrect Changes
Recently used file listEnable MRU File List
Recently used file list, (number of files)Size of MRU File List
Provide feedback with soundProvide Feedback with Sound
Compact on CloseAuto Compact
New database sort orderNew Database Sort Order
Remove personal information from file properties on saveRemove Personal Information
Default database folderDefault Database Directory

E.25.1.3. Edit/Find Tab
Option textString argument
Default find/replace behaviorDefault Find/Replace Behavior
Confirm, Record changesConfirm Record Changes
Confirm, Document deletionsConfirm Document Deletions
Confirm, Action queriesConfirm Action Queries
Show list of values in, Local indexed fieldsShow Values in Indexed
Show list of values in, Local nonindexed fieldsShow Values in Nonindexed
Show list of values in, ODBC fieldsShow Values in Remote
Show list of values in, Records in local snapshotShow Values in Snapshot
Show list of values in, Records at serverShow Values in Server
Don't display lists where more than this number of records readShow Values in Limit

E.25.1.4. Datasheet Tab
Option textString argument
Default colors, FontDefault Font Color
Default colors, BackgroundDefault Background Color
Default colors, GridlinesDefault Gridlines Color
Default gridlines showing, HorizontalDefault Gridlines Horizontal
Default gridlines showing, VerticalDefault Gridlines Vertical
Default column widthDefault Column Width
Default font, FontDefault Font Name
Default font, WeightDefault Font Weight
Default font, SizeDefault Font Size
Default font, UnderlineDefault Font Underline
Default font, ItalicDefault Font Italic
Default cell effectDefault Cell Effect
Show animationsShow Animations
Show SmartTags on DatasheetsShow SmartTags on Datasheets

E.25.1.5. Keyboard Tab
Option textString argument
Move after enterMove After Enter
Behavior entering fieldBehavior Entering Field
Arrow key behaviorArrow Key Behavior
Cursor stops at first/last fieldCursor Stops at First/Last Field
Auto commitIme Autocommit
Datasheet IME controlDatasheet Ime Control

E.25.1.6. Tables/Queries Tab
Option textString argument
Table design, Default field sizes - TextDefault Text Field Size
Table design, Default field sizes - NumberDefault Number Field Size
Table design, Default field typeDefault Field Type
Table design, AutoIndex on Import/CreateAutoIndex on Import/Create
Query design, Show table namesShow Table Names
Query design, Output all fieldsOutput All Fields
Query design, Enable AutoJoinEnable AutoJoin
Query design, Run permissionsRun Permissions
Query design, SQL Server Compatible Syntax (ANSI 92) - This databaseANSI Query Mode
Query design, SQL Server Compatible Syntax (ANSI 92) - Default for new databasesANSI Query Mode Default
Query design, Query design font, FontQuery Design Font Name
Query design, Query design font, SizeQuery Design Font Size
Show Property Update Options buttonsShow Property Update Options buttons

E.25.1.7. Forms/Reports Tab
Option textString argument
Selection behaviorSelection Behavior
Form templateForm Template
Report templateReport Template
Always use event proceduresAlways Use Event Procedures
Show SmartTags on FormsShow SmartTags on Forms
Show Windows Themed Controls on FormsThemed Form Controls

E.25.1.8. Advanced Tab
Option textString argument
DDE operations, Ignore DDE requestsIgnore DDE Requests
DDE operations, Enable DDE refreshEnable DDE Refresh
Default File FormatDefault File Format
Default open modeDefault Open Mode for Databases
Command-line argumentsCommand-Line Arguments
OLE/DDE timeout (sec)OLE/DDE Timeout (sec)
Default record lockingDefault Record Locking
Refresh interval (sec)Refresh Interval (sec)
Number of update retriesNumber of Update Retries
ODBC refresh interval (sec)ODBC Refresh Interval (sec)
Update retry interval (msec)Update Retry Interval (msec)
Open databases using record-level lockingUse Row Level Locking

E.25.1.9. Pages Tab
Option textString argument
Default Designer Properties, Section IndentSection Indent
Default Designer Properties, Alternate Row ColorAlternate Row Color
Default Designer Properties, Caption Section StyleCaption Section Style
Default Designer Properties, Footer Section StyleFooter Section Style
Default Database/Project Properties, Use Default Page FolderUse Default Page Folder
Default Database/Project Properties, Default Page FolderDefault Page Folder
Default Database/Project Properties, Use Default Connection FileUse Default Connection File
Default Database/Project Properties, Default Connection FileDefault Connection File

E.25.1.10. Spelling Tab
Option textString argument
Dictionary LanguageSpelling dictionary language
Add words toSpelling add words to
Suggest from main dictionary onlySpelling suggest from main dictionary only
Ignore words in UPPERCASESpelling ignore words in UPPERCASE
Ignore words with numbersSpelling ignore words with number
Ignore Internet and file addressesSpelling ignore Internet and file addresses
Language-specific, German: Use post-reform rulesSpelling use German post-reform rules
Language-specific, Korean: Combine aux verb/adjSpelling combine aux verb/adj
Language-specific, Korean: Search misused word listSpelling use auto-change list
Language-specific, Korean: Process compound nounsSpelling process compound nouns
Language-specific, Hebrew modesSpelling Hebrew modes
Language-specific, Arabic modesSpelling Arabic modes

E.25.1.11. International Tab
Option textString argument
Right-to-Left, Default directionDefault direction
Right-to-Left, General alignmentGeneral alignment
Right-to-Left, Cursor movementCursor movement
Use Hijri CalendarUse Hijri Calendar

E.25.1.12. Error Checking Tab
Option textString argument
Settings, Enable error checkingEnable Error Checking
Settings, Error indicator colorError Checking Indicator Color
Form/Report Design Rules, Unassociated label and controlUnassociated Label and Control Error Checking
Form/Report Design Rules, New unassociated labelsNew Unassociated Label Error Checking
Form/Report Design Rules, Keyboard shortcut errorsKeyboard Shortcut Errors Error Checking
Form/Report Design Rules, Invalid control propertiesInvalid Control Properties Error Checking
Form/Report Design Rules, Common report errorsCommon Report Errors Error Checking

E.25.1.13. RunCommand Method Arguments

One of the easiest ways to perform a variety of functions in Microsoft Access is through use of the RunCommand method. You can use this anywhere within your code. The RunCommand method takes a single argument, the acCommand constant. All of the available acCommand constants are listed in the following table. For convenience, they are listed in two columns. Each of these arguments represents some command in Access that is accessible from a menu or toolbar.

ArgumentArgument
acCmdAboutMicrosoftAccessacCmdPivotChartDrillOut
acCmdAddInManageracCmdPivotChartMultiplePlots
acCmdAddToNewGroupacCmdPivotChartMultiplePlotsUnifiedScale
acCmdAddWatchacCmdPivotChartShowLegend
acCmdAdvancedFilterSortacCmdPivotChartType
acCmdAlignBottomacCmdPivotChartUndo
acCmdAlignCenteracCmdPivotChartView
acCmdAlignLeftacCmdPivotCollapse
acCmdAlignmentAndSizingacCmdPivotDelete
acCmdAlignMiddleacCmdPivotDropAreas
acCmdAlignRightacCmdPivotExpand
acCmdAlignToGridacCmdPivotRefresh
acCmdAlignTopacCmdPivotShowAll
acCmdAlignToShortestacCmdPivotShowBottom1
acCmdAlignToTallestacCmdPivotShowBottom10
acCmdAnalyzePerformanceacCmdPivotShowBottom10Percent
acCmdAnalyzeTableacCmdPivotShowBottom1Percent
acCmdAnswerWizardacCmdPivotShowBottom2
acCmdApplyDefaultacCmdPivotShowBottom25
acCmdApplyFilterSortacCmdPivotShowBottom25Percent
acCmdAppMaximizeacCmdPivotShowBottom2Percent
acCmdAppMinimizeacCmdPivotShowBottom5
acCmdAppMoveacCmdPivotShowBottom5Percent
acCmdAppRestoreacCmdPivotShowBottomOther
acCmdAppSizeacCmdPivotShowTop1
acCmdArrangeIconsAutoacCmdPivotShowTop10
acCmdArrangeIconsByCreatedacCmdPivotShowTop10Percent
acCmdArrangeIconsByModifiedacCmdPivotShowTop1Percent
acCmdArrangeIconsByNameacCmdPivotShowTop2
acCmdArrangeIconsByTypeacCmdPivotShowTop25
acCmdAutoCorrectacCmdPivotShowTop25Percent
acCmdAutoDialacCmdPivotShowTop2Percent
acCmdAutoFormatacCmdPivotShowTop5
acCmdBackgroundPictureacCmdPivotShowTop5Percent
acCmdBackgroundSoundacCmdPivotShowTopOther
acCmdBackupacCmdPivotTableClearCustomOrdering
acCmdBookmarksClearAllacCmdPivotTableCreateCalcField
acCmdBookmarksNextacCmdPivotTableCreateCalcTotal
acCmdBookmarksPreviousacCmdPivotTableDemote
acCmdBookmarksToggleacCmdPivotTableExpandIndicators
acCmdBringToFrontacCmdPivotTableExportToExcel
acCmdCallStackacCmdPivotTableFilterBySelection
acCmdChangeToCheckBoxacCmdPivotTableGroupItems
acCmdChangeToComboBoxacCmdPivotTableHideDetails
acCmdChangeToCommandButtonacCmdPivotTableMoveToColumnArea
acCmdChangeToImageacCmdPivotTableMoveToDetailArea
acCmdChangeToLabelacCmdPivotTableMoveToFilterArea
acCmdChangeToListBoxacCmdPivotTableMoveToRowArea
acCmdChangeToOptionButtonacCmdPivotTablePercentColumnTotal
acCmdChangeToTextBoxacCmdPivotTablePercentGrandTotal
acCmdChangeToToggleButtonacCmdPivotTablePercentParentColumnItem
acCmdChartSortAscByTotalacCmdPivotTablePercentParentRowItem
acCmdChartSortDescByTotalacCmdPivotTablePercentRowTotal
acCmdClearAllacCmdPivotTablePromote
acCmdClearAllBreakpointsacCmdPivotTableRemove
acCmdClearGridacCmdPivotTableShowAsNormal
acCmdClearHyperlinkacCmdPivotTableShowDetails
acCmdClearItemDefaultsacCmdPivotTableSubtotal
acCmdCloseacCmdPivotTableUngroupItems
acCmdCloseWindowacCmdPivotTableView
acCmdColumnWidthacCmdPreviewEightPages
acCmdCompactDatabaseacCmdPreviewFourPages
acCmdCompileAllModulesacCmdPreviewOnePage
acCmdCompileAndSaveAllModulesacCmdPreviewTwelvePages
acCmdCompileLoadedModulesacCmdPreviewTwoPages
acCmdCompleteWordacCmdPrimaryKey
acCmdConditionalFormattingacCmdPrint
acCmdConnectionacCmdPrintPreview
acCmdControlWizardsToggleacCmdPrintRelationships
acCmdConvertDatabaseacCmdProcedureDefinition
acCmdConvertMacrosToVisualBasicacCmdPromote
acCmdCopyacCmdProperties
acCmdCopyDatabaseFileacCmdPublish
acCmdCopyHyperlinkacCmdPublishDefaults
acCmdCreateMenuFromMacroacCmdQueryAddToOutput
acCmdCreateRelationshipacCmdQueryGroupBy
acCmdCreateReplicaacCmdQueryParameters
acCmdCreateShortcutacCmdQueryTotals
acCmdCreateShortcutMenuFromMacroacCmdQueryTypeAppend
acCmdCreateToolbarFromMacroacCmdQueryTypeCrosstab
acCmdCutacCmdQueryTypeDelete
acCmdDataAccessPageAddToPageacCmdQueryTypeMakeTable
acCmdDataAccessPageBrowseacCmdQueryTypeSelect
acCmdDataAccessPageDesignViewacCmdQueryTypeSQLDataDefinition
acCmdDataAccessPageFieldListRefreshacCmdQueryTypeSQLPassThrough
acCmdDatabasePropertiesacCmdQueryTypeSQLUnion
acCmdDatabaseSplitteracCmdQueryTypeUpdate
acCmdDataEntryacCmdQuickInfo
acCmdDataOutlineacCmdQuickPrint
acCmdDatasheetViewacCmdQuickWatch
acCmdDateAndTimeacCmdRecordsGoToFirst
acCmdDebugWindowacCmdRecordsGoToLast
acCmdDeleteacCmdRecordsGoToNew
acCmdDeleteGroupacCmdRecordsGoToNext
acCmdDeletePageacCmdRecordsGoToPrevious
acCmdDeleteQueryColumnacCmdRecoverDesignMaster
acCmdDeleteRecordacCmdRedo
acCmdDeleteRowsacCmdReferences
acCmdDeleteTabacCmdRefresh
acCmdDeleteTableacCmdRefreshPage
acCmdDeleteTableColumnacCmdRegisterActiveXControls
acCmdDeleteWatchacCmdRelationships
acCmdDemoteacCmdRemove
acCmdDesignViewacCmdRemoveFilterSort
acCmdDiagramAddRelatedTablesacCmdRemoveTable
acCmdDiagramAutosizeSelectedTablesacCmdRename
acCmdDiagramDeleteRelationshipacCmdRenameColumn
acCmdDiagramLayoutDiagramacCmdRenameGroup
acCmdDiagramLayoutSelectionacCmdRepairDatabase
acCmdDiagramModifyUserDefinedViewacCmdReplace
acCmdDiagramNewLabelacCmdReportHdrFtr
acCmdDiagramNewTableacCmdReset
acCmdDiagramRecalculatePageBreaksacCmdResolveConflicts
acCmdDiagramShowRelationshipLabelsacCmdRestore
acCmdDiagramViewPageBreaksacCmdRowHeight
acCmdDocMaximizeacCmdRun
acCmdDocMinimizeacCmdRunMacro
acCmdDocMoveacCmdRunOpenMacro
acCmdDocRestoreacCmdSave
acCmdDocSizeacCmdSaveAllModules
acCmdDocumenteracCmdSaveAllRecords
acCmdDropSQLDatabaseacCmdSaveAs
acCmdDuplicateacCmdSaveAsASP
acCmdEditHyperlinkacCmdSaveAsDataAccessPage
acCmdEditingAllowedacCmdSaveAsHTML
acCmdEditRelationshipacCmdSaveAsIDC
acCmdEditTriggersacCmdSaveAsQuery
acCmdEditWatchacCmdSaveAsReport
acCmdEncryptDecryptDatabaseacCmdSaveLayout
acCmdEndacCmdSaveModuleAsText
acCmdExitacCmdSaveRecord
acCmdExportacCmdSelectAll
acCmdFavoritesAddToacCmdSelectAllRecords
acCmdFavoritesOpenacCmdSelectDataAccessPage
acCmdFieldListacCmdSelectForm
acCmdFilterByFormacCmdSelectRecord
acCmdFilterBySelectionacCmdSelectReport
acCmdFilterExcludingSelectionacCmdSend
acCmdFindacCmdSendToBack
acCmdFindNextacCmdServerFilterByForm
acCmdFindNextWordUnderCursoracCmdServerProperties
acCmdFindPreviousacCmdSetControlDefaults
acCmdFindPrevWordUnderCursoracCmdSetDatabasePassword
acCmdFitToWindowacCmdSetNextStatement
acCmdFontacCmdShowAllRelationships
acCmdFormatCellsacCmdShowDirectRelationships
acCmdFormHdrFtracCmdShowEnvelope
acCmdFormViewacCmdShowMembers
acCmdFreezeColumnacCmdShowNextStatement
acCmdGoBackacCmdShowOnlyWebToolbar
acCmdGoContinueacCmdShowTable
acCmdGoForwardacCmdSingleStep
acCmdGroupByTableacCmdSizeToFit
acCmdGroupControlsacCmdSizeToFitForm
acCmdHideColumnsacCmdSizeToGrid
acCmdHidePaneacCmdSizeToNarrowest
acCmdHideTableacCmdSizeToWidest
acCmdHorizontalSpacingDecreaseacCmdSnapToGrid
acCmdHorizontalSpacingIncreaseacCmdSortAscending
acCmdHorizontalSpacingMakeEqualacCmdSortDescending
acCmdHyperlinkDisplayTextacCmdSortingAndGrouping
acCmdImportacCmdSpeech
acCmdIndentacCmdSpelling
acCmdIndexesacCmdSQLView
acCmdInsertActiveXControlacCmdStartupProperties
acCmdInsertChartacCmdStepInto
acCmdInsertFileacCmdStepOut
acCmdInsertFileIntoModuleacCmdStepOver
acCmdInsertHyperlinkacCmdStepToCursor
acCmdInsertLookupColumnacCmdStopLoadingPage
acCmdInsertLookupFieldacCmdSubdatasheetCollapseAll
acCmdInsertMovieFromFileacCmdSubdatasheetExpandAll
acCmdInsertObjectacCmdSubdatasheetRemove
acCmdInsertPageacCmdSubformDatasheet
acCmdInsertPictureacCmdSubformDatasheetView
acCmdInsertPivotTableacCmdSubformFormView
acCmdInsertProcedureacCmdSubformInNewWindow
acCmdInsertQueryColumnacCmdSubformPivotChartView
acCmdInsertRowsacCmdSubformPivotTableView
acCmdInsertSpreadsheetacCmdSwitchboardManager
acCmdInsertSubdatasheetacCmdSynchronizeNow
acCmdInsertTableColumnacCmdTabControlPageOrder
acCmdInsertUnboundSectionacCmdTableAddTable
acCmdInvokeBuilderacCmdTableCustomView
acCmdJoinPropertiesacCmdTableNames
acCmdLastPositionacCmdTabOrder
acCmdLayoutPreviewacCmdTestValidationRules
acCmdLineUpIconsacCmdTileHorizontally
acCmdLinkedTableManageracCmdTileVertically
acCmdLinkTablesacCmdToggleBreakpoint
acCmdListConstantsacCmdToggleFilter
acCmdLoadFromQueryacCmdToolbarControlProperties
acCmdMacroConditionsacCmdToolbarsCustomize
acCmdMacroNamesacCmdTransferSQLDatabase
acCmdMakeMDEFileacCmdTransparentBackground
acCmdMaximiumRecordsacCmdTransparentBorder
acCmdMicrosoftAccessHelpTopicsacCmdUndo
acCmdMicrosoftOnTheWebacCmdUndoAllRecords
acCmdMicrosoftScriptEditoracCmdUnfreezeAllColumns
acCmdMoreWindowsacCmdUngroupControls
acCmdNewDatabaseacCmdUnhideColumns
acCmdNewGroupacCmdUpsizingWizard
acCmdNewObjectAutoFormacCmdUserAndGroupAccounts
acCmdNewObjectAutoReportacCmdUserAndGroupPermissions
acCmdNewObjectClassModuleacCmdUserLevelSecurityWizard
acCmdNewObjectDataAccessPageacCmdVerticalSpacingDecrease
acCmdNewObjectDiagramacCmdVerticalSpacingIncrease
acCmdNewObjectFormacCmdVerticalSpacingMakeEqual
acCmdNewObjectFunctionacCmdViewCode
acCmdNewObjectMacroacCmdViewDataAccessPages
acCmdNewObjectModuleacCmdViewDetails
acCmdNewObjectQueryacCmdViewDiagrams
acCmdNewObjectReportacCmdViewFieldList
acCmdNewObjectStoredProcedureacCmdViewForms
acCmdNewObjectTableacCmdViewFunctions
acCmdNewObjectViewacCmdViewGrid
acCmdObjBrwFindWholeWordOnlyacCmdViewLargeIcons
acCmdObjBrwGroupMembersacCmdViewList
acCmdObjBrwHelpacCmdViewMacros
acCmdObjBrwShowHiddenMembersacCmdViewModules
acCmdObjBrwViewDefinitionacCmdViewQueries
acCmdObjectBrowseracCmdViewReports
acCmdOfficeClipboardacCmdViewRuler
acCmdOLEDDELinksacCmdViewShowPaneDiagram
acCmdOLEObjectConvertacCmdViewShowPaneGrid
acCmdOLEObjectDefaultVerbacCmdViewShowPaneSQL
acCmdOpenDatabaseacCmdViewSmallIcons
acCmdOpenHyperlinkacCmdViewStoredProcedures
acCmdOpenNewHyperlinkacCmdViewTableColumnNames
acCmdOpenSearchPageacCmdViewTableColumnProperties
acCmdOpenStartPageacCmdViewTableKeys
acCmdOpenTableacCmdViewTableNameOnly
acCmdOpenURLacCmdViewTables
acCmdOptionsacCmdViewTableUserView
acCmdOutdentacCmdViewToolbox
acCmdOutputToExcelacCmdViewVerifySQL
acCmdOutputToRTFacCmdViewViews
acCmdOutputToTextacCmdVisualBasicEditor
acCmdPageHdrFtracCmdWebPagePreview
acCmdPageNumberacCmdWebPageProperties
acCmdPagePropertiesacCmdWebTheme
acCmdPageSetupacCmdWindowArrangeIcons
acCmdParameterInfoacCmdWindowCascade
acCmdPartialReplicaWizardacCmdWindowHide
acCmdPasteacCmdWindowSplit
acCmdPasteAppendacCmdWindowUnhide
acCmdPasteAsHyperlinkacCmdWordMailMerge
acCmdPasteSpecialacCmdWorkgroupAdministrator
acCmdPivotAutoAverageacCmdZoom10
acCmdPivotAutoCountacCmdZoom100
acCmdPivotAutoFilteracCmdZoom1000
acCmdPivotAutoMaxacCmdZoom150
acCmdPivotAutoMinacCmdZoom200
acCmdPivotAutoStdDevacCmdZoom25
acCmdPivotAutoStdDevPacCmdZoom50
acCmdPivotAutoSumacCmdZoom500
acCmdPivotAutoVaracCmdZoom75
acCmdPivotAutoVarPacCmdZoomBox
acCmdPivotChartByRowByColumnacCmdZoomSelection
acCmdPivotChartDrillInto 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.38.221