ACC: No "Can't Add Records" Data Mode Arg for OpenForm 95/97ID: Q131585
|
Novice: Requires knowledge of the user interface on single-user computers.
When you are setting the OpenForm macro action's Data Mode argument, you
can select Add, Edit, or Read Only. However, the Data Mode argument does
not have a setting that you can select that prevents adding new records to
a form.
To work around this behavior, use Visual Basic code to pass a True or
False value in the OpenArgs argument of the OpenForm action to set the
AllowAdditions property in the form's Load event.
The following example demonstrates how you can use the OpenForm macro
action's OpenArgs argument to pass the specified AllowAdditions setting for
use in a form.
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file, or
perform these steps on a copy of the Northwind database.
Private Sub Form_Load (Cancel As Integer)
Me.AllowAdditions = Me.OpenArgs
End Sub
DoCmd.OpenForm "Employees",,,,,,False
This behavior is by design.
Keywords : kbusage FmsProp
Version : 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 3, 1999