Properties by Programming Task

The following table lists Microsoft Access and Visual Basic properties by programming task.

Table 2 Properties by Programming Task

Category Task Property
     
Application object Determine the object in which a macro or Visual Basic code is running CodeContextObject
  Determine whether the current Microsoft Access application was started by user or through OLE Automation UserControl
Collection object Count the number of objects in a Collection object Count (Visual Basic)
Combo box/list box Bind a combo box or list box to a table field BoundColumn
  Determine the list index value of an item in a combo box or list box ListIndex

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Determine the number of rows in a combo box or list box ListCount
  Specify the width of the list box portion of a combo box ListWidth
  Refer to a column or row in a combo box or list box Column
  Specify whether to allow multiple selections in a list box MultiSelect
  Determine if an item in a list box is selected Selected
  Restrict text entry in a list LimitToList
  Specify the column widths or hide a column in a multiple-column combo box or list box ColumnWidths
  Specify the number of columns in a combo box or list box ColumnCount
  Specify the number of rows in a list box ListRows
  Specify the text contained in a text box or in the text box portion of a combo box Specify the text contained in a text box or in the text box portion of a combo box
  Specify whether values are automatically filled in when you type in a combo box AutoExpand
  Specify the source for a list box RowSource,
  Display a single row of column headings for list boxes, combo boxes, and OLE objects that accept column headings ColumnHeads

Table 2 Properties by Programming Task (continued)

Category Task Property
     
Database properties Set startup options AppTitle, AppIcon, StartupForm, StartupShowDBWindow, StartupShowStatusBar, StartupMenuBar, StartupShortcutMenuBar, AllowFullMenus, AllowShortcutMenus, AllowBuiltInToolbars, AllowToolbarChanges, AllowBreakIntoCode, AllowSpecialKeys, AllowBypassKey
  Set summary properties Title, Subject, Author, Manager, Company, Category, Keywords, Comments
Data source Specify the source of a control’s data ControlSource
  Specify underlying records for a form or report RecordSource
  Refer to underlying records Bookmark,
RecordsetClone
  Specify a filter for a table, form, or query and apply the filter Filter, FilterOn
  Specify how to sort records in a table, form, report, or query and apply sort OrderBy, OrderByOn
  Set the name of a bitmap to load in a command button or toggle button, or as a background for a form or report Picture
  Specify whether an object’s picture is linked or embedded PictureType
  Specify a numeric value for controls included in an option group OptionValue
  Keep a running sum in a text box RunningSum

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Determine whether the current record has been modified since it was last saved Dirty
Display Specify form views DefaultView, ViewsAllowed
  Specify how to size a picture or other object SizeMode
  Specify gridline effects on a datasheet DatasheetCellsEffect, DatasheetGridlinesBehavior, DatasheetGridlinesColor
  Automatically center a form when it is displayed AutoCenter
  Specify the display of columns or rows in Datasheet view ColumnHidden, ColumnWidth, FrozenColumns, RowHeight
  Specify font characteristics DatasheetFontHeight, , , , ,
FontBold, FontItalic,
FontName, FontSize,
FontUnderline, FontWeight
  Specify text to display in title bar Caption
  Specify text to display in status bar StatusBarText
  Specify text, number, and date format AddColon, DecimalPlaces,
  Align text LabelAlign, TextAlign
  Automatically resize form window AutoResize
  Specify the order of fields in Datasheet view ColumnOrder
  Specify whether a form or report is repainted Painting
Editing Enable or disable editing AllowAdditions, AllowDeletions, AllowEdits, DataEntry, RecordsetType
  Specify whether data in a control can be changed Locked, Enabled

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Specify type of locking LockEdits, RecordLocks
  Specify how a linked OLE object is updated UpdateOptions
  Specify data entry DefaultValue, InputMask, ValidationRule, ValidationText, DataEntry
  Determine or specify the value of a control Value
  Determine the value of a bound control before it was edited OldValue
  Determine or specify characteristics of the selected text SelLength, SelStart,
Error trapping Return the number of an error Number
  Return a descriptive string associated with an error Description
  Return the name of the object or application that originally generated the error. Source
  Return a system error code produced by a call into a dynamic-link library (DLL) LastDLLError
Events Occurs when a user opens, resizes, or closes a form or report OnClose, OnLoad, OnOpen, OnResize, OnUnload
  Occurs when a user adds, changes, or deletes data AfterDelConfirm, , AfterUpdate, , , , OnChange, , OnDelete, , OnUpdated
  Occurs when a user creates or applies a filter OnFilter, OnApplyFilter
  Occurs when a user changes the focus OnActivate, OnDeactivate, , OnExit, , OnLostFocus

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Occurs when a user interacts with the keyboard or mouse OnClick, OnDblClick, , OnKeyPress, , OnMouseDown, ,
  Occurs when a user changes to Print Preview OnFormat, OnPrint, , OnNoData, OnPage
  Occurs when a Microsoft Access error is generated in a form or report OnError
  Occurs on an interval specified by the TimerInterval property OnTimer
  Specify the interval between Timer events TimerInterval
  Determine the prefix of an event procedure name EventProcPrefix
Form/report design Specify when an object is displayed or printed DisplayWhen
  Automatically add a label to new controls AutoLabel
  Generate an automatic tab when the last character permitted by a text box’s input mask is typed AutoTab
  Specify whether a tab moves to a new record or page Cycle
  Specify the effect of pressing the ENTER key in a text box EnterKeyBehavior
  Determine if a form or report is bound to an empty recordset HasData
  Specify whether a group header is repeated on the next page or column RepeatSection
  Determine if report section will continue on the next page WillContinue
  Determine if report section began on a previous page HasContinued
  Specify whether report groups are kept together by page or by column GrpKeepTogether

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Specify text that appears in a screen tip ControlTipText
  Specify whether the What’s This button is added to a form’s title bar WhatsThisButton
  Specify whether the Close button on a form is enabled CloseButton
  Specify the Cancel button Cancel
  Specify the Default button Default
  Specify whether lines separate sections or records on a form DividingLines
  Specify the text in the status bar StatusBarText
  Specify a control’s place in the tab order on a form TabIndex
  Specify whether a control can receive the focus in Form view TabStop
  Display record selectors or scroll bars RecordSelectors, ScrollBars
  Display the Control menu, Maximize button, or Minimize button ControlBox, MinMaxButtons, BorderStyle
  Specify a string expression that identifies the name of a form, report, section, or control Name
  Display navigation buttons and a record number box on a form NavigationButtons
  Specify grid alignment units GridX, GridY
  Specify whether to display shortcut menus on a form ShortcutMenu
  Determine whether a form or report uses printer or screen fonts LayoutForPrint
  Specify a palette for a form or report PaintPalette, PaletteSource
  Determine the palette used to create the bitmap for a command button or toggle button ObjectPalette

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Specify how records in a form or report are linked to records in a subform, subreport, or embedded object LinkChildFields, LinkMasterFields
  Hide or display an object or a section Transparent, Visible, DisplayWhen
  Specify the color of an object or a section BackColor, BackStyle, FillColor, ForeColor, Transparent
  Specify border appearance BorderColor, , BorderWidth
  Create special effects SpecialEffect
  Specify the placement and proportion of a picture PictureAlignment, PicturePages, PictureTiling, PictureSizeMode, SizeMode
  Specify the direction of a line LineSlant
Graphics Draw CurrentX, CurrentY, DrawMode, DrawStyle, DrawWidth, FillColor, FillStyle, ScaleHeight, ScaleLeft, ScaleMode, ScaleTop, ScaleWidth
Help Specify the name or identification number of a Help topic HelpContext (Visual Basic), HelpContextID (Microsoft Access), HelpFile (Microsoft Access), HelpFile(Visual Basic)
Macros Specify the name of a macro or an event procedure to run when an event occurs See the Events category of this table
  Specify whether a macro repeats while a button remains pressed AutoRepeat
  Specify the name of a menu bar macro MenuBar, ShortcutMenuBar
Miscellaneous Enable a control to receive the focus Enabled
  Determine the number of controls on a form or report Count (Microsoft Access)
  Determine the view you’re currently in CurrentView

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Determine if a control is selected in form Design view InSelection
  Determine which control last received the focus PreviousControl
  Refer to a stored string expression when a form is opened OpenArgs
  Store extra information about a form, report, section, or control needed by your database Tag
Object linking and embedding (OLE) Get a description of linked object data Item
  Determine the display and behavior of an OLE object Action, AutoActivate,
DisplayType, SizeMode
  Determine the type of OLE object Class, OLEClass, OLEType,
  Link and update data SourceDoc, SourceItem,
  Specify a linked or embedded OLE Automation object in a control Object
  Specify an operation to perform Action, ObjectVerbs, ObjectVerbsCount, Verb
  Determine the address of an OLE object lpOLEObject
  Determine the palette used to create an OLE object ObjectPalette
Object references Refer to the active object ActiveControl, , ActiveReport, ActiveDatasheet
  Return the name or type of the active object CurrentObjectName,
CurrentObjectType
  Refer to a section Section
  Refer to a form or report Form, Me, Report
  Refer to a form or report that contains a control or section Parent
  Refer to a subform, subreport, or linked object SourceObject

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Refer to a form module or report module Module
  Return the DAO DBEngine object DBEngine
Printing Count the number of times the current section in a report is formatted or printed FormatCount,
PrintCount
  Specify the printing of sections ForceNewPage,
KeepTogether (Sections), , , , PageFooter, , PrintSection
  Specify the printing of duplicate data HideDuplicates
  Specify a page number or the total number of pages Page, Pages
  Determine whether lines and rectangles are replaced by rules when using a laser printer FastLaserPrinting
  Specify printer driver and printer information PrtDevMode, PrtDevNames, PrtMip
Query design Customize column headings in a crosstab query ColumnHeadings
  Specify information for a make-table or append query DestConnectStr, ,
  Specify information for a pass-through query LogMessages, ,
  Specify information for a query using external data Source, SourceConnectStr,
  Specify a name for an input table or query Alias
  Specify records to return TopValues, UniqueRecords,
  Specify the number of seconds to wait before a timeout error occurs when a query is run on an Open Database Connectivity (ODBC) database ODBCTimeout

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Specify whether to show all fields from the underlying tables OutputAllFields
  Specify permissions to view or run a query RunPermissions
Records Move between records Bookmark
  Enable record filtering AllowFilters
Size and position Return the height and width of a form WindowHeight, WindowWidth
  Determine the height and width of a window containing a form InsideHeight, InsideWidth
  Specify position of a label or control LabelX, LabelY, Left,
  Specify size of control Height, Width
  Specify the position of the current section CurrentSectionLeft,
  Automatically size a section or control when it’s printed CanGrow, CanShrink
Sorting and grouping Create a group footer or header GroupFooter,
  Determine which settings to use for the first week of year and the first day of week when grouping dates in a report DateGrouping
  Specify an array for each field or expression you group on GroupLevel
  Specify how to group data GroupInterval, GroupOn
  Specify how to keep grouped data together on the same page KeepTogether (Groups)
  Print a report section all on one page KeepTogether (Sections)
  Specify the sort order for values in a report SortOrder
Table design Specify field attributes Caption, DataType, , Description, , FieldSize,
  Specify the primary key Primary
  Set a single-field index Indexed

Table 2 Properties by Programming Task (continued)

Category Task Property
     
  Ignore Null values in index fields IgnoreNulls
  Specify whether values in an index must be unique Unique
  Specify the default control you want to use for displaying a field on forms DisplayControl
  Place conditions on what values are allowed in a field or record AllowZeroLength, , Required, ,
Windows Specify whether a form is modal Modal
  Specify whether a form opens as a pop-up form PopUp
  Get the handle for the main Microsoft Access window hWndAccessApp
  Get the handle for a form or report window hWnd