Use query Design view to generate an SQL statement to paste elsewhere

Use query Design view to generate an SQL statement to paste elsewhere

You can use SQL statements and clauses in many expressions, as arguments of procedures, and as property settings. For example, you can use an SQL statement to set the RowSource property of a list box in a form or report to generate a list of items.

  1. In query Design view, create the query from which you want to generate the SQL statement.

  2. Click the arrow next to the View button on the toolbar, and then click SQL View.

  3. Select all or part of the SQL statement, and then press CTRL+C to copy the selected text onto the Clipboard.

  4. Place the insertion point where you want to paste the SQL statement, such as in a property box or in the Code window of the Visual Basic Editor.

  5. Press CTRL+V.

Notes