Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Update field/table from a derived field in another query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wendy - 21 Apr 2008 17:54 GMT
Hi,
I've read quite a few of the posts up here already and I seem to have a
mixture of problems and solutions, but none quite fit. So I 'm hoping
someone'll pick up and give me the light bulb on this one.

I have a query (qryOutputGrade), it calculates the standard deviated grade
from a set of class average scores. Fields = Subject_Set, Pupil_Code, StdDiff
and Attain.

I want to update my table (of assesments), tblPrepAssessments, to have the
field GRADE_1 updated to hold the Attain grade from qryOutputGrade, based on
the fact that tblPrepAssessments.Pupil_Code=qryOutputGrade.Pupil_Code AND
tblPrepAssessments.Subject_Set=qryOutputGrade.Subject_Set.

There are blanks in the qryOutputGrade.Attain field as not all scores have
been collected yet.

I've tried the following in QBE:
UPDATE qryPrepAssessments, qryOutputGrade SET qryPrepAssessments.GRADE_1 =
[qryOutputGrade]![Attain]
WHERE (([qryPrepAssessments]![PUPIL_CODE]=[qryOutputGrade]![PUPIL_CODE] And
[qryPrepAssessments]![Subject_Set]=[qryOutputGrade]![Subject_Set]));

this runs a result in the QBE pane, but when trying to use the Run command
gives the following error:
"Operation must use an updateable query"

Have also tried this:
UPDATE qryPrepAssessments, qryOutputGrade SET qryPrepAssessments.GRADE_1 =
[qryOutputGrade]![Attain]
WHERE (([qryPrepAssessments]![PUPIL_CODE]=[qryOutputGrade]![PUPIL_CODE] And
[qryPrepAssessments]![Subject_Set]=[qryOutputGrade]![Subject_Set]));

or is there any other way of doing this? Thanks for your help, greatly
appreciated.

Wendy
Evi - 22 Apr 2008 11:16 GMT
You Sql is telling you to update qryPrepAssessments. If that is a Totals
query of some sort, then you won't be able to update it either by typing
into it or by an Update query.
What if you change the sql to tblPrepAssessments?

Evi

> Hi,
> I've read quite a few of the posts up here already and I seem to have a
[quoted text clipped - 33 lines]
>
> Wendy
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.