Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help creating an Update Query

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
I am trying to create an Update Query but am having trouble. I have a "target" table, tblWinSchoolExtract, that has data. The key for the target table is Student Number. Then I have a query, qryContact, where I have contact information.

I want to put the Contact Information [qryContact].[Last_Name], [qryContact].[First_Name], and [qryContact].[Phone] into [tblWinSchoolExtract].[Last_Name],[tblWinSchoolExtract].[First_Name],[tblWinSchoolExtract].[HomePhone].

When I create the Update Query and put [tblWinSchoolExtract].[Last_Name] in the Field Name and [qryContact].[Last_Name] in the Update TO: a Enter Parameter Value box pops up. There is no parameter on this query.

When I flip-flop the fields and put [qryContact].[Last_Name] in the Field and [tblWinSchoolExtract].[Last_Name] in the Update To: I get an error, "Operation must use an updateable query"

I want to update the table, not the query so I think the first way is the way to go but why won't the table update???

Thanks!

Hillary
 
Field: should show the field that needs to be updated
Update To: should show the field containing the new data

What does the text say on the Parameter Value pop up window?
 
When I set it up the way it should be and run the query I get the message, "Operation must use an updateable query."

Here's the SQL...
UPDATE WinSchoolExtract INNER JOIN [qryContact1 Extract] ON WinSchoolExtract.StudentNr = [qryContact1 Extract].STD_NUMBER SET WinSchoolExtract.ParentLast = [qryContact1 Extract].[LAST_NAME];

Thanks,

Hillary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top