INF: OpenQuery Is Not a Method; Use OpenQueryDef Instead

    Article ID: Q103132
    Creation Date: 18-AUG-1993
    Revision Date: 19-SEP-1996

    The information in this article applies to:

    • Microsoft Access versions 1.0, 1.1

    SUMMARY

    The examples on pages 132 and 133 of the Microsoft Access "Introduction to Programming" manual incorrectly use OpenQuery as a method. OpenQuery is an action, not a method. Instead, the OpenQueryDef method should be used in the examples on pages 132 and 133.

    MORE INFORMATION

    Change the third line of the example on page 132 from

       Set Q = db.OpenQuery("Sales Totals")
    
    
    to:

       Set Q = db.OpenQueryDef("Sales Totals")
    
    
    Change the third line of the example on page 133 from

       Set Q = db.OpenQuery("Update Sales")
    
    
    to:

       Set Q = db.OpenQueryDef("Update Sales")
    
    
    REFERENCES

    For more information about the OpenQueryDef method, search for "OpenQueryDef," and then "OpenQueryDef Method" using the Microsoft Access Help menu.


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: 1.00 1.10
KBCategory: kbusage kbdocerr
KBSubcategory: DcmOthr