How to edit data generated by a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me what i need to do to allow my data generated by a query
to be edited in a form. Right now I have my data looking the way it is
suppose to look but I am unable to edit it in a form view.

Any leads would be appreciated.
 
Merlin,

Possibly your query in not undateable. There are a number of factors
that determine whether a query is updateable or not. You can open the
query's datasheet, and see if it can be edited there, and this will tell
you whether this is the problem. If you could post back with the SQL
view of the query, someone may be able to advise more specifically.

Another thing to check is the AllowEdits property of the form.
 
Steve,

The query results cannot be edited at this point. The following is the SQL
view of the query. This query was written in ACESS 97 and I am attempting to
update it to 2003. I have a form that I use to enter data associated with
each project. The fields that I edit from the form are PROJMGR, CSACOMMENTS,
CSAIFC and CSADES. This is later turned into a report for distribution.
Thanks for your help!

SELECT DISTINCTROW CSA.CSAPROJCD, CSA.PROJNO, CSA.CSAENG, CSA.CSADES,
CSA.CSACOMMENTS, CSA.CSABUD, CSA.CSAETC, ARCHITECTURE.ARCHBUD,
ARCHITECTURE.ARCHETC, PROJECT.PROJTITLE, PROJECT.PROJMGR,
PROJCLIENT.CLIENTNAME, PROJCLIENT.PROJCLIENTMGR, CSA.CSAIFC, HVAC.HVACBUD,
HVAC.HVACETC
FROM (((PROJECT INNER JOIN CSA ON PROJECT.PROJNO = CSA.PROJNO) INNER JOIN
PROJCLIENT ON PROJECT.PROJNO = PROJCLIENT.PROJNO) INNER JOIN ARCHITECTURE ON
PROJECT.PROJNO = ARCHITECTURE.PROJNO) INNER JOIN HVAC ON PROJECT.PROJNO =
HVAC.PROJNO
WHERE (((CSA.CSAPROJCD)<>"X" Or (CSA.CSAPROJCD) Is Null) AND
((CSA.CSAETC)>0)) OR (((CSA.CSAPROJCD)<>"X" Or (CSA.CSAPROJCD) Is Null) AND
((ARCHITECTURE.ARCHETC)>0)) OR (((CSA.CSAPROJCD)<>"X") AND ((CSA.CSAIFC) Is
Not Null)) OR (((CSA.CSAPROJCD)<>"X") AND ((CSA.CSAENG) Is Not Null)) OR
(((CSA.CSAPROJCD)<>"X" Or (CSA.CSAPROJCD) Is Null) AND ((HVAC.HVACETC)>0))
ORDER BY CSA.CSAPROJCD, CSA.PROJNO;
 
Merlin,

You have a query here with 3 one-to-many relationships, and you are also
enforcing Unique Records (i.e. DISTINCTROW). Such a query will not
normally be updateable. It may be possible to make it work by setting
the Recordset Type property of the query to Inconsistent Updates, but I
would very strongly recommend against this, unless you are absolutely
sure of what you're doing. A preferable approach would be to use a form
based on your Project table, with subforms based on each of your CSA,
ARCHTECHTURE, and PROJCLIENT tables. This is normally the best way to
use forms to enter/edit one-to-many data.
 
Back
Top