Microsoft Access VBA Macro Programming
CurrentDb CurrentDbis a top-level DAO (Data Access Objects) object. It allows you to create recordsets and use your VBA code to ...
MyField must be a numeric value. The method will return the average of all the MyField values within the table. You can use an o ...
If RecSet![First Name] = "Nancy" Then RecSet.Edit RecSet![Company] = "Northwind" RecSet.Update End If RecSet.MoveNext Loop If Ms ...
This will return the value of MyField for the last record in the table MyTable. You can use an optional criterion as follows: Ms ...
This will return the sum of all MyField values in the table MyTable. MyField must be a numeric data type. You can use an optiona ...
Printer Printerwill allow you access to the default printer properties. You can view the name of the default printer using the f ...
This will display the name of each report loaded, but notice that it does not include reports that are not loaded. You can addre ...
Version Versionwill tell you the version of Access that is being run. This is useful to know when the user loads your applicatio ...
AllowAdditions On a form, you can set theAllowAdditionsproperty to allow or deny users from adding new records to the underlying ...
Filter TheFilterproperty returns the filter that is being used on the form: MsgBox Me.Filter It can also be used to set the filt ...
half-drawn on the screen, which looks untidy to the user. Doing aRepaintbefore the process is run tidies the form up. Me.Repaint ...
then you can use a message box to ask the user for a confirmation to save. If the user answers No, then the code uses the Undo m ...
This code initially creates aTableDefobject using theDimstatement. It then uses the CreateTableDefmethod to create a new table c ...
QueryDefs TheQueryDefscollection represents all the query definitions within the database. You can iterate through this collecti ...
Main Properties, Methods, and Collections This section details the main properties, methods, and collections you will use within ...
Edit TheEditmethod is used to edit records in theRecordsetobject. It allows changes to be made to data in specified fields. TheU ...
FindLast TheFindLastmethod uses a specified criterion to find the last instance of a record within the recordset. The recordset ...
MoveFirst TheMoveFirstmethod selects the first record in the recordset. RecSet.MoveFirst MoveLast TheMoveLastmethod selects the ...
This page intentionally left blank ...
Chapter 16 The DoCmd Object Chapter 16 The DoCmd Object T heDoCmdobject is a special object model in Access VBA. It is fairly si ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf