Changing Fields in a Form/Query

L

Larry G.

I created a query, then a form that is linked to that query, I wanted
managers to be able to edit the data directly on the form but for some reason
I can't. Any suggestions?
 
X

xRoachx

Larry, there are several situations where you cannot edit query data (from
help file):

-- Query based on three or more tables in which there is a
many-to-one-to-many relationship

-- Crosstab query

-- SQL pass-through query

-- Query that calculates a sum, average, count or other type of total on the
values in a field, or an update query that references a field in the Update
To row from either a crosstab query, select query (select query: A query that
asks a question about the data stored in your tables and returns a result set
in the form of a datasheet, without changing the data.), or subquery
(subquery: An SQL SELECT statement that is inside another select or action
query.) that contains totals or aggregate functions

-- Union query

-- Query whose UniqueValues property is set to Yes

-- Query that includes a linked ODBC (Open Database Connectivity (ODBC): A
standard method of sharing data between databases and programs. ODBC drivers
use the standard Structured Query Language (SQL) to gain access to external
data.) table with no unique index (unique index: An index defined by setting
a field's Indexed property to Yes (No Duplicates). A unique index will not
allow duplicate entries in the indexed field. Setting a field as the primary
key automatically defines the field as unique.), or a Paradox table without a
primary key

-- Query that includes more than one table or query, and the tables or
queries aren't joined by a join line in Design view

-- Calculated field

-- Field is read-only; the database was opened as read-only or is located on
a read-only drive

-- Field in record that has been deleted or locked (locked: The condition of
a record, recordset, or database that makes it read-only to all users except
the user currently modifying it.) by another user
 
K

Ken Sheridan

Its most likely because your query is not updatable. When you open the query
as a datasheet can you change the data? Queries which use SQL aggregate
functions (SUM, MAX etc) will not be updatable, even if the aggregate
functions are n a subquery. You can sometimes make such queries updatable by
using VBA domain aggregate functions instead (DSum, DMax etc) to enable you
to edit the base fields; you can't edit the aggregated data of course. Also
make sure that the fields on which tables are joined are indexed. At the end
of the day, however, it may be that a query to do what you want is never
going to be updatable and you might need to break it down and use one or more
subforms within your main form to enable related tables to be edited.
 
F

fredg

I created a query, then a form that is linked to that query, I wanted
managers to be able to edit the data directly on the form but for some reason
I can't. Any suggestions?

Some queries are not updateable.
See Access help:
Query + Troubleshoot queries + Select Query + I can't update data
from a query + Data can't be updated
 
Top