ACC: Form Name Err Msg Using Data Outline Control (95/97) (142843)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q142843
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you double-click a row in your Data Outline Control, you may receive
the following error message:
The action or method requires a Form Name argument.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Microsoft Access applications using the
programming tools provided with Microsoft Access. For more information
about Visual Basic for Applications, please refer to your version of the
"Building Applications with Microsoft Access" manual.
CAUSE
The Data Outline Control's FormName property for that level is blank.
RESOLUTION
You can either change the Data Outline Control to open a form at that level
or create a Visual Basic for Applications procedure that will cancel the
event if the FormName property is blank. To create this procedure, follow
these steps:
- View the form containing the Data Outline Control in Design view and
using the right mouse button (right-click), click the Data Outline
Control.
- Click Build Event.
- Select RequestFormOpen in the Procedure (Proc:) list.
- Add the following sample code to the Data Outline Control's
RequestFormOpen event:
Sub ActiveXCtl0_RequestFormOpen(Cancel As Integer, ByVal Level As _
Integer)
Dim L As Object
Set L = Me![ActiveXCtl0].Object.Levelinfos
If L(Level).FormName = "" Then Cancel = True
End Sub
This procedure prevents the Data Outline Control from trying to open the
form if the FormName property is blank.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kberrmsg kbprb kbProgramming KB142843 |
---|
|