ACC: How to Copy/Paste SQL Statements from Forms to Queries

Last reviewed: April 2, 1997
Article ID: Q90877
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SUMMARY

Novice: Requires knowledge of the user interface on single-user computers.

If you want to copy an SQL statement from the RowSource or ControlSource property of a control, or the RecordSource property of a form or report, and paste it into a query, you must use the CTRL+C method to copy the SQL statement to the Clipboard. In Microsoft Access 1.x, you also must use the CTRL+V method to paste the statement into the query's SQL view.

In Microsoft Access 2.0, 7.0, and 97, you can use the Builder button next to the RowSource, ControlSource and RecordSource properties to invoke the Query Builder, and then save the SQL statement as a query that way. It is not necessary to copy and paste the SQL statement.

MORE INFORMATION

You cannot use the Copy and Paste commands from the Edit menu to copy and paste in the situations described above. You must use CTRL+C to copy the information to the Clipboard, and CTRL+V to paste the information into the query's SQL view.

Note that in Microsoft Access 2.0, 7.0, and 97, the SQL window of a query is not a modal dialog box; therefore, menu commands are available and you can use the Paste command.


Keywords : FmsHowto kbusage
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbhowto


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.

Last reviewed: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.