Access VBA Macro Programming

(Joao Candeias) #1
AllowAdditions
On a form, you can set theAllowAdditionsproperty to allow or deny users from adding new
records to the underlying data source:

Me.AllowAdditions = True

This code allows users to add new records on the active form.

AllowDeletions
On a form, you can set theAllowDeletionsproperty to allow or deny users from deleting
records in the underlying data source:

Me.AllowDeletions = False

This code prevents users from deleting records on the active form.

AllowEdits
On a form, you can set theAllowEditsproperty to allow or deny users the right to edit
records in the underlying data source:

Me.AllowEdits= True

This code allows users to edit records on the active form.

AllowFilters
On a form or report, you can set theAllowFiltersproperty to allow users to allow filters or
deny them from using filters:

Me.AllowFilters = True

This code allows users to use filters.

Caption
You can use theCaptionproperty to set the caption on the form or report:

Me.Caption = "MyCaption"

Dirty
The propertyDirtycan be used on a form to determine if any changes have been made to the
data on the form:

MsgBox Me.Dirty

This returns True if a change has been made and False if no change has been made. The
form must be bound to a table or query for this to work.

202 Microsoft Access 2010 VBA Macro Programming

Free download pdf