Microsoft KB Archive/118793

From BetaArchive Wiki

PRB: Form Name Error Message Using Data Outline Control

Article ID: Q118793
Creation Date: 31-JUL-1994
Revision Date: 20-SEP-1996 The information in this article applies to:

  • Microsoft Access version 2.0

SYMPTOMS


Advanced: Requires expert coding, interoperability, and multiuser skills.

When you double-click a row in your data outline control, you may receive the following error message:

   Action requires a Form Name argument

CAUSE

The data outline control's FormName property for that level is blank.

RESOLUTION


You can create an Access Basic procedure to check whether a FormName property is blank. To use this method, add the following sample code to the data outline control's RequestFormOpen event:

   Sub Outline_RequestFormOpen (Cancel As Integer, Level As Integer)
   Dim L As Object
      Set L = Me![Outline].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. MORE INFORMATION


Steps to Reproduce Behavior


NOTE: This example assumes that you have the Data Outline Control Wizard loaded as a library.

  1. Open the sample database NWIND.MDB.
  2. Create a new, blank form. Make sure that the Control Wizards button in the toolbox is selected (the button should appear sunken).
  3. From the Edit menu, choose Insert Object.
  4. In the Insert Object dialog box, select the Insert Control option button.
  5. In the Control Type box, select Data Outline Control. Choose OK.
  6. In the Table/Query box, select the Categories table.
  7. Press the TAB key to move to the Associated Form box, then press the DEL key to remove Categories from the Associated Form box.
  8. Choose the Finish button.
  9. View the form in Form view and double-click any row in the data outline control.

REFERENCES

For more information about the RequestFormOpen event, search for "RequestFormOpen," and then "RequestFormOpen Event" using the Data Outline Control Help file that is included with the Microsoft Access Developer's Toolkit version 2.0.

Microsoft Access Developer's Toolkit "Advanced Topics," version 2.0, Chapter 6, "Using OLE Custom Controls," pages 163-175



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.


Additional reference words: 2.00
KBCategory: kbinterop kberrmsg
KBSubcategory: IntpCstm