Datubaze.files.wordpress.com



Order of events for forms and subforms

Events occur for forms when you open or close a form, move between forms, or work with data on a form.

1. When you open a form, the following sequence of events occurs for the form:

Open - Load - Resize - Activate - Current

If there are no active controls on the form, the GotFocus event also occurs for the form after the Activate event but before the Current event.

2. When you close a form, the following sequence of events occurs for the form:

Unload - Deactivate - Close

If there are no active controls on the form, the LostFocus event also occurs for the form after the Unload event but before the Deactivate event.

3. When you switch between two open forms, the Deactivate event occurs for the first form, and the Activate event occurs for the second form:

Deactivate (form1) - Activate (form2)

The Deactivate event for a form also occurs when you switch from the form to another window in Microsoft Access. However, the Deactivate event doesn't occur when you switch to a dialog box, to a form whose PopUp property is set to Yes, or to a window in another application.

Note   An Open event doesn't occur if you move to a form that is already open, even if you've moved to the form by carrying out an OpenForm action.

4. When you first open a form, the following sequence of events occurs:

Open (form) - Load (form) - Resize (form) - Activate (form) - Current (form) - Enter (control) - GotFocus (control)

5. When you close a form, the following sequence of events occurs:

Exit (control) - LostFocus (control) - Unload (form) - Deactivate (form) - Close (form)

If you've changed data in a control, the BeforeUpdate and AfterUpdate events for both the control and the form occur before the Exit event for the control.

6. When you open a form containing a subform, the subform and its records are loaded before the main form. Thus, the events for the subform and its controls (such as Open, Current, Enter, and GotFocus) occur before the events for the form. The Activate event doesn't occur for subforms, however, so opening a main form triggers an Activate event only for the main form.

7. When you close a form containing a subform, the subform and its records are unloaded after the form. The Deactivate event doesn't occur for subforms, so closing a main form triggers a Deactivate event only for the main form. The events for the controls, form, and subform occur in the following order:

1. Events for the subform's controls (such as Exit and LostFocus)

2. Events for the form's controls (including the subform control)

3. Events for the form (such as Deactivate and Close)

4. Events for the subform

Order of events for controls on forms

Events occur for controls on forms when you move the focus to a control, and when you change and update data in a control.

1. When you move the focus to a control on a form — for example, by opening a form that has one or more active controls or by moving to another control on the same form:

Enter - GotFocus

2. If you are opening a form, these events occur after the events associated with opening the form (such as Open, Activate, and Current), as follows:

Open (form) - Activate (form) - Current (form) - Enter (control) - GotFocus (control)

3. When the focus leaves a control on a form — for example, when you close a form that has one or more active controls or move to another control on the same form:

Exit - LostFocus

4. If you are closing a form, the Exit and LostFocus events occur before the events associated with closing the form (such as Unload, Deactivate, and Close), as follows:

Exit (control) - LostFocus (control) - Unload (form) - Deactivate (form) - Close (form)

5. When you enter or change data in a control on a form and then move the focus to another control:

BeforeUpdate - AfterUpdate

6. The Exit and LostFocus events for the changed control occur after the BeforeUpdate and AfterUpdate events:

BeforeUpdate - AfterUpdate - Exit - LostFocus

7. When you change the text in a text box or in the text box portion of a combo box, the Change event occurs. This event occurs whenever the contents of the control change, but before you move to a different control or record (and thus, before the BeforeUpdate and AfterUpdate events occur). The following sequence of events occurs for each key you press in a text box or in the text box portion of a combo box:

KeyDown - KeyPress - Change - KeyUp

The NotInList event occurs after you enter a value in a combo box that isn't in the combo box list and then attempt to move to another control or record. It occurs after the keyboard events and the Change events for the combo box, but before any other control or form events.

8. If the LimitToList property of the combo box is set to Yes, the Error event for the form occurs immediately after the NotInList event:

KeyDown - KeyPress - Change - KeyUp - NotInList - Error

Order of events for records on forms

Events occur for records on forms when you move the focus to a record, update data in a record, delete an existing record or records, or create a new record.

Moving the focus to records and updating data in records

1. When you move the focus to an existing record on a form, enter or change data in the record, and then move the focus to another record, the following sequence of events occurs for the form:

Current (form) - BeforeUpdate (form) - AfterUpdate (form) - Current (form)

2. When you leave the record whose data has changed, but before you enter the next record, the Exit and LostFocus events occur for the control with the focus. These events occur after the BeforeUpdate and AfterUpdate events for the form, as follows:

BeforeUpdate (form) - AfterUpdate (form) - Exit (control) - LostFocus (control) - Current (form)

3. Open a form and change data in a control:

Current (form) - Enter (control) - GotFocus (control) - BeforeUpdate (control) - AfterUpdate (control)

4. Move the focus to another control:

Exit (control1) - LostFocus (control1) - Enter (control2) - GotFocus (control2)

Move the focus to another record:

BeforeUpdate (form) - AfterUpdate (form) - Exit (control2) - LostFocus (control2) - Current (form)

5. Deleting records

When you delete a record, the following events occur for the form, and Microsoft Access displays a dialog box asking you to confirm the deletion:

Delete - BeforeDelConfirm - AfterDelConfirm

If you cancel the Delete event, the BeforeDelConfirm and AfterDelConfirm events don't occur and the dialog box isn't displayed.

6. Creating a new record

When you move the focus to a new (blank) record on a form and then create a new record by typing in a control, the following sequence of events occurs:

Current (form) - Enter (control) - GotFocus (control) - BeforeInsert (form) - AfterInsert (form)

The BeforeUpdate and AfterUpdate events for the controls on the form and for the new record occur after the BeforeInsert event and before the AfterInsert event.

Events used for data validation

|Form event |Use for validation |

|BeforeUpdate |Before saving new or changed data in a record |

|OnDelete |Before deleting a record |

|Control event |Use for validation |

|BeforeUpdate |Before saving new or changed data in a control |

|OnExit |Before leaving a control |

By assigning new values to controls and properties in response to events that occur on a form or report, you can make the objects you've created work together so that they're easier to use.

Here are some common situations that call for setting values with a macro or an event procedure:

Setting the value of a control on one form equal to the value of a control on another form

For example, you can put a command button on a Customers form that opens an Orders form and automatically fills in billing information from the Customers form.

[pic]

Updating the value of a control that's dependent on the value of another control

For example, you might have a PaymentDate control whose default value is the ship date (the value of the ShipDate control). You can use a macro or an event procedure to automatically reset the value of the PaymentDate control whenever the value in the ShipDate control changes.

Setting a form or control property in response to a selection or other event

You can use a macro or an event procedure to set a form or control property in order to:

• Hide or display a control based on the value of another control. For example, you might want the DateDue control on an Orders form to be hidden if the order is already paid for (if the Paid control's value is Yes) or visible if payment is still due.

• Disable or lock a control based on the value of another control. For example, you can disable a DriversLicense control if the value of an Age control is below the minimum age for a driver's license.

• Display different sets of records depending on a selection. For example, you can control what records are displayed in a Customers form, depending on which option is selected in a Customer Type option group. To do this, set the RecordSource property of the form to one of several different queries, each of which contains the records for a different set of customers.

Set the value of a control based on the value of another control

Add an assignment statement to the procedure by typing the identifier for the control whose value you want to set, an equal sign (=), and the identifier for the control whose value you want to assign to the first control.

1. To refer to the value of a control on the current form, type the Me keyword followed by the ! operator and the name of the control. For example, the following statement assigns the value of the City control on the current form to the ShipCity control on the current form:

Me![ShipCity] = Me![City]

2. To refer to the value of a control on a different form, type the control's full identifier. For example, the following identifier refers to the ShipCity control on the ShipForm form:

Forms![ShipForm]![ShipCity]

Set the value of a property in response to an event by using Visual Basic

Add an assignment statement to the procedure by typing the identifier for the property whose value you want to set, an equal sign (=), and the value you want to assign.

To refer to the property of a control on the current form, type the Me keyword followed by the ! operator, the name of the control, the . (dot) operator, and the name of the property.

1. The following statement assigns the value False to the Visible property of the DateDue control on the current form:

Me![DateDue].Visible = False

2.To refer to the property of a control on a different form, type the control's full identifier. For example, the following identifier refers to the Visible property of the DateDue control on the ShipForm form:

Forms![ShipForm]![DateDue].Visible

Setting the value of a property in response to an event

You can set the value of a property based on a value in the current record by running an event procedure in response to the form's Current event. For example, you might want the DateDue control on an Orders form to be hidden if the order is already paid for (if the value of the Paid control is Yes or True):

If Me![Paid] = True Then

Me![DateDue].Visible = False

Else

Me![DateDue].Visible = True

End If

You can set the value of a property based on a value in the current record by running a an event procedure in response to the form's Current event. For example, you might want the DateDue control on an Orders form to be hidden if the order is already paid for (if the value of the Paid control is Yes or True). To use an event procedure, add the following Visual Basic code to the Form_Current event procedure:

If Me![Paid] = True Then

Me![DateDue].Visible = False

Else

Me![DateDue].Visible = True

End If

Display a message box by using Visual Basic

Add an assignment statement to the procedure that assigns the value returned by the MsgBox function to a variable. The function returns different values depending on the button a user clicks in the message box. Your procedure can then perform different operations based on the value returned.

For example, the following assignment statement runs the MsgBox function, displaying a message, and assigns the value returned by the function to the variable RetValue:

RetValue = MsgBox("Continue?", vbOKCancel)

You can use the MsgBox function in Microsoft Access to create a formatted error message similar to built-in error messages displayed by Microsoft Access. The following example displays a formatted dialog box with a sectioned string.

MsgBox "Wrong button!" & chr(13) _

    & "This button doesn't work." & chr(13) –

    & "Try another.", vbOKOnly + vbExclamation

Note   To display a message box without an icon in Microsoft Access, simply omit any constant that would denote an icon, or supply a value of zero for the buttons argument, as in the following example.

MsgBox "No icons included.", 0

Example of validating data by using an event procedure

In some circumstances, you might want to use validation rules that depend on complex conditions, and then take different actions depending on those conditions. You can, however, create an event procedure that checks which country is entered in the Country control and then checks that the value entered in the PostalCode control has the right characteristics for that country.

First, open the form that contains the controls in Design view. Then, add the following Visual Basic code to the form's BeforeUpdate event procedure to display different messages, depending on the value of the Country control and the length of the entry in the PostalCode control.

Private Sub Form_BeforeUpdate(Cancel As Integer)

Select Case Me![Country]

Case "France", "Italy", "Spain"

If Len(Me![PostalCode]) 5 Then

MsgBox "PostalCode must be 5 characters."

Cancel = True

End If

Case "Australia", "Singapore"

If Len(Me![PostalCode]) 4 Then

MsgBox "PostalCode must be 4 characters."

Cancel = True

End If

End Select

End Sub

Note   You add Visual Basic code to the BeforeUpdate event procedure for the form, not the control, because the validation involves two different controls on the form.

About working with data and database objects by using Visual Basic code

In addition to working with data and objects such as forms and reports in the Microsoft Access interface, you can use Microsoft Visual Basic to write procedures that dynamically create, delete, and modify data and objects. For example, you can write a procedure that places a caption on a form or that changes the color of a field on a form when a user performs a particular action.

You can refer to data and objects directly in your code, or you can declare object variables to represent them. After an object variable is declared and assigned, you can use it just as you would the name of the object it represents, and you can change its value, just as you can change the value of any variable.

For example, the following Sub procedure creates a table, Old Invoices, with a single field, OrderID:

Sub CreateTable ()

' Declare variables.

Dim dbs As Database, tbl As TableDef, fld As Field

' Assign the current database to the database variable.

Set dbs = CurrentDB

' Create a new table and field, and assign them to the table and field variables.

Set tbl = dbs.CreateTableDef("Old Invoices")

Set fld = tbl.CreateField("OrderID", dbText)

' Add the field to the table, then add the table to the database.

tbl.Fields.Append fld

dbs.TableDefs.Append tbl

dbs.TableDefs.Refresh

End Sub

Microsoft Data Access Objects (DAO) provides the objects, such as tables, queries, relationships, and indexes, that handle data-management tasks in a Microsoft Access database. These objects are called data access objects. You can share Visual Basic code that uses data access objects with other applications that use Microsoft DAO, such as Microsoft Excel.

You can also use Jet and Replication Objects to access and manipulate data in a database server through any OLE DB provider.

In addition, Microsoft Access defines a variety of objects that you use for working with data, such as forms, reports, and controls.

Actions Grouped by Task   

The following table groups actions into categories based on their use.

|Category |Task |Action |

|Data in forms and reports |Restrict data |ApplyFilter |

|  |Move through data |FindNext, FindRecord, GoToControl, GoToPage, GoToRecord |

|Execution |Carry out a command |RunCommand |

|  |Exit Microsoft Access |Quit |

|  |Run a macro, procedure, or query |OpenQuery, RunCode, RunMacro, RunSQL |

|  |Run another application |RunApp |

|  |Stop execution |CancelEvent, Quit, StopAllMacros, StopMacro |

|Import/export |Send Microsoft Access objects to other|OutputTo, SendObject |

| |applications | |

|  |Transfer data between Microsoft Access|TransferDatabase, TransferSpreadsheet, TransferText |

| |and other data formats | |

|Object manipulation |Copy, rename, or save an object |CopyObject, Rename, Save |

|  |Delete an object |DeleteObject |

|  |Move or resize a window |Maximize, Minimize, MoveSize, Restore |

|  |Open or close an object |Close, OpenForm, OpenModule, OpenQuery, OpenReport, OpenTable, |

| | |OpenDataAccessPage, OpenDiagram, OpenStoredProcedure, OpenView |

|  |Print an object |OpenForm, OpenQuery, OpenReport, , OpenStoredProcedure, OpenView, |

| | |PrintOut |

|  |Select an object |SelectObject |

|  |Set the value of a field, control, or |SetValue |

| |property | |

|  |Update data or the screen |RepaintObject, Requery, ShowAllRecords |

|   | | |

|Miscellaneous |Create a custom menu bar, a custom |AddMenu |

| |shortcut menu, global menu bar, or | |

| |global shortcut menu | |

|  |Set the state of menu items on a |SetMenuItem |

| |custom menu bar or global menu bar | |

|  |Display information on the screen |Echo, Hourglass, MsgBox, SetWarnings |

|  |Generate keystrokes |SendKeys |

|  |Display or hide the built-in or custom|ShowToolbar |

| |command bar | |

|  |Sound a beep |Beep |

Events and Event Properties Reference

The following reference groups events into categories based on the type of task and lists the events alphabetically.

Grouped by Task

|Data Events |Keyboard Events |

|Error and Timing Events |Mouse Events |

|Filter Events |Print Events |

|Focus Events |Window Events |

Listed Alphabetically

|Event |Event property |

|Activate |OnActivate |

|AfterDelConfirm |AfterDelConfirm |

|AfterInsert |AfterInsert |

|AfterUpdate |AfterUpdate |

|ApplyFilter |OnApplyFilter |

|BeforeDelConfirm |BeforeDelConfirm |

|BeforeInsert |BeforeInsert |

|BeforeUpdate |BeforeUpdate |

|Change |OnChange |

|Click |OnClick |

|Close |OnClose |

|Current |OnCurrent |

|DblClick |OnDblClick |

|Deactivate |OnDeactivate |

|Delete |OnDelete |

|Dirty Event |OnDirty |

|Enter |OnEnter |

|Error |OnError |

|Exit |OnExit |

|Filter |OnFilter |

|Format |OnFormat |

|GotFocus |OnGotFocus |

|Initialize |none |

|ItemAdded |none |

|ItemRemoved |none |

|KeyDown |OnKeyDown |

|KeyPress |OnKeyPress |

|KeyUp |OnKeyUp |

|Load |OnLoad |

|LostFocus |OnLostFocus |

|MouseDown |OnMouseDown |

|MouseMove |OnMouseMove |

|MouseUp |OnMouseUp |

|NoData |OnNoData |

|NotInList |OnNotInList |

|Open |OnOpen |

|Page |OnPage |

|Print |OnPrint |

|Resize |OnResize |

|Retreat |OnRetreat |

|Terminate |none |

|Timer |OnTimer |

|Unload |OnUnload |

|Updated |OnUpdated |

| |

Functions Reference

The following reference lists all the functions alphabetically.

Note   Functions marked with an (*) should not be used within a data access page against a stored query.

A–C

|Abs (VBA) |Cos (VBA) |

|Array (VBA) |Count (DAO) |

|Asc (VBA) |Atn (VBA) |

|Avg (DAO) |CBool (VBA) |

|CreateObject (VBA) |CByte (VBA) |

|CCur (VBA) |CDate (VBA) |

|CSng (VBA) |CDbl (VBA) |

|CStr (VBA) |CDec (VBA) |

|CurDir (VBA) |Choose (VBA) |

|Chr (VBA) |CInt (VBA) |

|CVar (VBA) |CLng (VBA) |

|CVDate (VBA) |CVErr (VBA) |

|Command* |  |

D–H

|Date (VBA) |DVar |

|DateAdd (VBA) |DVarP |

|DateDiff (VBA) |Environ* (VBA) |

|DatePart (VBA) |EOF (VBA) |

|DateSerial (VBA) |Error (VBA) |

|DateValue (VBA) |EuroConvert |

|DAvg |Eval |

|Day (VBA) |Exp (VBA) |

|Dcount |FileAttr (VBA) |

|DDB (VBA) |FileDateTime* (VBA) |

|DDE |FileLen* (VBA) |

|DDEInitiate |First (DAO) |

|DDERequest |Fix (VBA) |

|DDESend |Format (VBA) |

|DFirst |FreeFile (VBA) |

|Dir* (VBA) |FV (VBA) |

|DLast |GetAllSettings (VBA) |

|DLookup |GetAttr* (VBA) |

|DMax |GetObject (VBA) |

|DMin |GetSetting* (VBA) |

|DoEvents (VBA) |GUIDFromString |

|DStDev |Hex (VBA) |

|DStDevP |Hour (VBA) |

|DSum |HyperlinkPart |

I–R

|IIf (VBA) |Log (VBA) |

|IMEStatus (VBA) |LTrim (VBA) |

|Input* (VBA) |Max (DAO) |

|InputBox (VBA) |Mid (VBA) |

|InStr (VBA) |Min (DAO) |

|Int (VBA) |Minute (VBA) |

|IPmt (VBA) |MIRR (VBA) |

|IRR (VBA) |Month (VBA) |

|IsArray (VBA) |MsgBox (VBA) |

|IsDate (VBA) |Now (VBA) |

|IsEmpty (VBA) |NPer (VBA) |

|IsError (VBA) |NPV (VBA) |

|IsMissing (VBA) |Nz |

|IsNull (VBA) |Oct (VBA) |

|IsNumeric (VBA) |Partition (VBA) |

|IsObject (VBA) |Pmt (VBA) |

|Last (DAO) |PPmt (VBA) |

|LBound (VBA) |PV (VBA) |

|LCase (VBA) |QBColor (VBA) |

|Left (VBA) |Rate (VBA) |

|Len (VBA) |RGB (VBA) |

|Right (VBA) |Loc (VBA) |

|Rnd (VBA) |LOF (VBA) |

|RTrim (VBA) |  |

S–Z

|Second (VBA) |SYD (VBA) |

|Seek (VBA) |Tab (VBA) |

|Sgn (VBA) |Tan (VBA) |

|Shell* (VBA) |Time (VBA) |

|Sin (VBA) |Timer (VBA) |

|SLN (VBA) |TimeSerial (VBA) |

|Space (VBA) |TimeValue (VBA) |

|Spc (VBA) |Trim (VBA) |

|Sqr (VBA) |TypeName (VBA) |

|StDev (DAO) |UBound (VBA) |

|StDevP (DAO) |UCase (VBA) |

|Str (VBA) |Val (VBA) |

|StrComp (VBA) |Var (DAO) |

|StrConv (VBA) |VarP (DAO) |

|String (VBA) |VarType (VBA) |

|StringFromGUID |Weekday (VBA) |

|Sum (DAO) |Year (VBA) |

|Switch (VBA) |  |

Methods Reference

The following reference groups all methods by object or collection and lists them alphabetically. A double asterisk (**) indicates that the method was added for Microsoft Access 2000.

Grouped by Object or Collection

|AccessObject |AccessObjectProperties |

|AccessObjectProperty |AllDataAccessPages |

|AllDatabaseDiagrams |AllForms |

|AllMacros |AllModules |

|AllQueries |AllReports |

|AllStoredProcedures |AllTables |

|AllViews |Application |

|Assistant (Office) |CodeData |

|CodeProject |Collection (VBA) |

|ComAddIns (Office) |Command (ADO) |

|Connection (ADO) |Connection (ADO) |

|Container, Containers (DAO) |Connection, Connections (DAO) |

|Controls |Control |

|CurrentProject |CurrentData |

|DataAccessPages |DataAccessPage |

|DBEngine (DAO) |Database, Databases (DAO) |

|DefaultWebOptions |Debug (VBA) |

|Document, Documents (DAO) |DoCmd |

|Error (ADO) |Err (VBA) |

|Errors (ADO) |Error, Errors (DAO) |

|Field, Fields (DAO) |Field (ADO) |

|FileSearch (Office) |Fields (ADO) |

|Group, Groups (DAO) |Form |

|Module |Index, Indexes (DAO) |

|Page |Modules |

|Pages |Page |

|Parameter (ADO) |Pages |

|Parameters (ADO) |Parameter, Parameters (DAO) |

|Property, Properties (DAO) |Property (ADO) |

|QueryDef, QueryDefs (DAO) |Properties (ADO) |

|Recordset, Recordsets (DAO) |Recordset (ADO) |

|References |Reference |

|Report |Relation, Relations (DAO) |

|TableDef, TableDefs (DAO) |Screen |

|VBE (VBA) |User, Users (DAO) |

|Workspace, Workspaces (DAO) |WebOptions |

Listed Alphabetically

A–C

|AccessError |Close (ADO) |

|Add (AccessObjectProperties Collection)** |Close (DAO) |

|Add (FormatConditions Collection)** |Close |

|Add (VBA) |CloseConnection** |

|Add (Pages collection) |CloseCurrentDatabase |

|AddFromFile (Module object) |CodeDb |

|AddFromFile (References collection) |CommitTrans (ADO) |

|AddFromGUID |CommitTrans (DAO) |

|AddFromString |CompactDatabase (DAO) |

|AddMenu** |CompareBookmarks (ADO) |

|AddNew (ADO) |CopyObject |

|AddNew (DAO) |CopyQueryDef (DAO) |

|AddToFavorites |CreateControl |

|Append (ADO) |CreateDataAccessPage** |

|Append (DAO) |CreateDatabase (DAO) |

|AppendChunk (ADO) |CreateEventProc |

|AppendChunk (DAO) |CreateField (DAO) |

|ApplyFilter |CreateForm |

|ApplyTheme** |CreateGroup (DAO) |

|Beep |CreateGroupLevel |

|BeginTrans (ADO) |CreateIndex (DAO) |

|BeginTrans (DAO) |CreateNewDocument** |

|BuildCriteria |CreateParameter (ADO) |

|Cancel (ADO) |CreateProperty (DAO) |

|Cancel (DAO) |CreateQueryDef (DAO) |

|CancelBatch (ADO) |CreateRelation (DAO) |

|CancelEvent |CreateReport |

|CancelUpdate (ADO) |CreateReportControl |

|CancelUpdate (DAO) |CreateTableDef (DAO) |

|Circle |CreateUser (DAO) |

|Clear (ADO) |CreateWorkspace (DAO) |

|Clear (VBA) |CurrentDb |

|Clone (ADO) |CurrentUser |

|Clone (DAO) |  |

D–F

|DefaultControl |Execute (ADO Command Object) |

|DefaultWorkspaceClone |Execute (ADO Connection Object) |

|Delete (ADO Fields Collection) |Execute (DAO) |

|Delete (ADO Parameters Collection) |FillCache (DAO) |

|Delete (ADO Recordset Collection) |Find |

|Delete (DAO) |Find (ADO) |

|Delete (FormatCondition Object)** |FindFirst (DAO) |

|Delete (FormatConditions Collection)** |FindLast (DAO) |

|DeleteLines |FindNext (DAO) |

|DeleteObject |FindNext |

|DoMenuItem |FindPrevious (DAO) |

|Dropdown |FindRecord |

|Echo (DoCmd object) |Follow |

|Echo (Application object) |FollowHyperlink |

|Edit (DAO) |  |

G–M

|GetChunk (ADO) |LoadPicture |

|GetChunk (DAO) |MakeReplica (DAO) |

|GetHiddenAttribute** |Maximize |

|GetOption |Minimize |

|GetRows (ADO) |Modify (FormatCondition Object)** |

|GetRows (DAO) |Move (ADO) |

|GoToControl |Move (DAO) |

|GoToPage (DoCmd object) |MoveFirst (ADO) |

|GoToPage (Form object) |MoveFirst (DAO) |

|GoToRecord |MoveLast (ADO) |

|GetString (ADO) |MoveLast (DAO) |

|Hourglass |MoveNext (ADO) |

|Idle (DAO) |MoveNext (DAO) |

|InsertLines |MovePrevious (ADO) |

|InsertText |MovePrevious (DAO) |

|Item (VBA) |MoveSize |

|Line |  |

N–Q

|NewAccessProject** |OpenQuery |

|NewCurrentDatabase |OpenRecordset (DAO) |

|NewPassword (DAO) |OpenReport |

|NextRecordset (ADO) |OpenSchema (ADO) |

|NextRecordset (DAO) |OpenStoredProcedure** |

|Open (ADO Connection Object) |OpenTable |

|Open (ADO Recordset Object) |OpenView** |

|OpenAccessProject** |OutputTo |

|OpenConnection** |PopulatePartial (DAO) |

|OpenConnection (DAO) |Print (VBA) |

|OpenCurrentDatabase |Print |

|OpenDataAccessPage** |PrintOut |

|OpenDatabase (DAO) |PSet |

|OpenDiagram** |Quit (DoCmd object) |

|OpenForm |Quit(Application object) |

|OpenModule |  |

R

|Raise (VBA) |RepaintObject |

|Recalc |RepairDatabase (DAO) |

|Refresh |ReplaceLine |

|Refresh (ADO) |Requery (ADO) |

|Refresh (DAO) |Requery (DAO) |

|RefreshDatabaseWindow |Requery (DoCmd object) |

|RefreshLink (DAO) |Requery (Control or Form object) |

|RefreshTitleBar |Restore |

|RegisterDatabase (DAO) |Resync (ADO) |

|Remove (AccessObjectProperties Collection)** |RollbackTrans (ADO) |

|Remove (VBA) |Rollback (DAO) |

|Remove (Pages collection) |Run |

|Remove (References collection) |RunCommand |

|Rename |RunMacro |

|Repaint |RunSQL |

S–Z

|Save |SizeToFit |

|Save (ADO) |Supports (ADO) |

|Scale |Synchronize (DAO) |

|Seek (ADO) |SysCmd |

|Seek (DAO) |TextHeight |

|SelectObject |TextWidth |

|SendObject |TransferDatabase |

|SetFocus |TransferSpreadsheet |

|SetHiddenAttribute** |TransferText |

|SetMenuItem |Undo |

|SetOption (DAO) |Update (ADO) |

|SetOption |Update (DAO) |

|SetWarnings |UpdateBatch (ADO) |

|ShowAllRecords |UseDefaultFolderSuffix** |

|ShowToolbar |  |

Statements Reference

The following reference lists all the statements alphabetically (except for SQL statements).

A–M

|AppActivate (VBA) |DeleteControl |

|Beep (VBA) |DeleteReportControl |

|Call (VBA) |DeleteSetting (VBA) |

|ChDir (VBA) |Dim (VBA) |

|ChDrive (VBA) |Do...Loop (VBA) |

|Close (VBA) |End (VBA) |

|Const (VBA) |Erase (VBA) |

|Date (VBA) |Error (VBA) |

|DDE |Exit (VBA) |

|DDEExecute |FileCopy (VBA) |

|DDEPoke |For Each...Next (VBA) |

|DDETerminate |For...Next (VBA) |

|DDETerminateAll |Function (VBA) |

|Declare (VBA) |Get (VBA) |

|DefBool (VBA) |GoSub...Return (VBA) |

|DefByte (VBA) |GoTo (VBA) |

|DefCur (VBA) |If...Then...Else (VBA) |

|DefDate (VBA) |Input # (VBA) |

|DefDbl (VBA) |Kill (VBA) |

|DefInt (VBA) |Let (VBA) |

|DefLng (VBA) |Line Input # (VBA) |

|DefObj (VBA) |Lock (VBA) |

|DefSng (VBA) |LSet (VBA) |

|DefStr (VBA) |Mid (VBA) |

|DefType (VBA) |MidB (VBA) |

|DefVar (VBA) |MkDir (VBA) |

N–Z

|Name (VBA) |Resume (VBA) |

|On Error (VBA) |Return (VBA) |

|On...GoSub (VBA) |RmDir (VBA) |

|On...GoTo (VBA) |RSet (VBA) |

|Open (VBA) |SaveSetting (VBA) |

|Option Base (VBA) |Seek (VBA) |

|Option Compare (VBA) |SelectCase (VBA) |

|Option Explicit (VBA) |SendKeys (VBA) |

|Option Private (VBA) |Set (VBA) |

|Print # (VBA) |SetAttr (VBA) |

|Private (VBA) |Static (VBA) |

|Property Get (VBA) |Stop (VBA) |

|Property Let (VBA) |Sub (VBA) |

|Property Set (VBA) |Time (VBA) |

|Public (VBA) |Type (VBA) |

|Put (VBA) |Unlock (VBA) |

|Randomize (VBA) |While...Wend (VBA) |

|ReDim (VBA) |Width # (VBA) |

|Rem (VBA) |With (VBA) |

|Reset (VBA) |Write # (VBA) |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download