Editing Rows in the Results Pane

See Also

In many cases, you can edit the data in the Results pane grid and save changes to the table or tables represented by the query. However, whether you can actually change, add, or delete rows depends on the type of query you have defined and on constraints, triggers, and permissions maintained by the database.

For details about the types of queries you can update, see Determining When Query Results Can Be Updated.

Note   You cannot update timestamp or binary columns using the Query Designer.

The Query Designer can do only minor validation of the data you enter in the Results pane. For example, if the price column of the titles table accepts only positive values, the Query Designer might not enforce this restriction, and it would be possible to enter a negative value. However, when you save a row, the database will report an error if any column in the row contains invalid data.

To edit data in the Results pane grid

  1. Navigate to the cells containing the data you want to change.

  2. Type in the new data. While you are editing, the leftmost column displays to indicate that the row is being edited.

    While you are editing, the following rules apply:

  3. Save your changes by moving to another row in the grid.

    Note   The Query Designer does not automatically save your changes if you switch to another pane. If you edit the current query (for example, by making a change in the Grid Pane), the Results pane is dimmed. However, it is still active, and you can still edit and save the row on which you had been working.

To cancel your changes for the current row, press ESC. If you press ESC while in a cell that you have changed, the changes for only that cell are canceled. If you press ESC while in a cell that you have not changed, the changes for the entire row are canceled and all the cells in that row revert to their old values.

If you are working with tables that can be shared, it is possible that a query you are using conflicts with changes being made by other users. For example, you might be using the Results pane to edit a row while another user executes an Update query that modifies the row you are editing.

When you save the row you have edited, the Query Designer compares the row against the version currently in the database. If there is a difference, the Query Designer displays the Query Definitions Differ dialog box and offers you these options: