Access VBA Macro Programming

(Joao Candeias) #1
soon as the user moves to another record or closes the form, that change is saved back to the
underlying tables and there is no warning that a change has been made. If the user deletes a
record, there is a confirmation message provided that you have not switched the warnings off.
When a form is created, all the Allow properties are set to Yes by default. It is well worth
ensuring that changes to records can only be made by users with permission, and this is
where VBA can be of help.
However, you now have a simple form that will act as a simple user interface on the
Orders table of the Northwind database.

Using Relational Fields in Your Form

You will have noticed that in the Orders table of the Northwind database, relational fields
such as Employee ID and Customer ID are used in the Orders table. These fields link the
record to data in the Employee and Customer tables using a unique internal ID number for
each record.

100 Microsoft Access 2010 VBA Macro Programming


Figure 9-2 Form View of the form
Free download pdf