PRB: Errors in ShowSupervisor() Sample Function

    Article ID: Q116147
    Creation Date: 13-JUN-1994
    Revision Date: 19-SEP-1996

    The information in this article applies to:

    • Microsoft Access version 2.0

    SYMPTOMS

    Moderate: Requires basic macro, coding, and interoperability skills.

    When you compile the sample ShowSupervisor() function on page 260 of the Microsoft Access version 2.0 "Building Applications" manual, you receive a "Type mismatch" error message because the sample function contains errors.

    RESOLUTION

    Modify the ShowSupervisor() function as follows:

    1. Remove ", MyBookmark As String" from the Dim line.
    2. Change

            Set MySet = MyForm.Records
      

      to:

            Set Myset = MyForm.RecordsetClone
      
    3. Remove the "MyForm.Bookmark = MyBookmark" line from the If statement.
    4. Remove the "MyDb.Close" line.

    STATUS

    This behavior no longer occurs in Microsoft Access for Windows 95 version 7.0.

    REFERENCES

    Microsoft Access "Building Applications," version 2.0, pages 260-261


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: kbusage kbdocerr kberrmsg
KBSubcategory: DcmOthr