Editing from Query Data View

  • Thread starter Thread starter JohnCreighton_
  • Start date Start date
J

JohnCreighton_

Is it possible to write a macro so when I click on a cell in the data
view of the query it will become editable so I can make changes. Once I
make changes I want to be able to click away and have it update the
necessary tables. Does anyone know where I might find some helpful
example code?
 
Access tables, queries, and form datasheets don't have "cells" (that's an MS
Excel term), they have records and fields. this is not just a question of
terminology - cells in an Excel spreadsheet are very different from fields
in an Access record, and you can't expect to manipulate them in similar
fashion.

the records in a query are either updateable, or not. you cannot control a
single field in a query, or even a single record. that's why queries are
poor vehicles for user interaction with data. if the query IS updateable,
you can bind it to a form, and *then* you have numerous options for
controlling when and how the user can edit a specific control in the form -
in all records, or only certain records, in the form's recordset.

note that queries have no records in and of themselves, rather they *return*
records, from one or more tables, that meet whatever criteria is specified
in the query. so if a form is bound to an updateable query, and you update a
record in the form, the data will be written to the underlying table(s)
unless you specifically prevent it.

hth
 
Back
Top