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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use results from one query to update to another table's field

Status
Not open for further replies.

julius1

Technical User
Oct 31, 2002
142
US
Morning, I have my query that I am using to extract data from one table and trying to get it to update to another table. The table I am trying to update to is update, the field is objectcode.
The query that extracted the data has the result as myval. The query does pull up and lists the results I am wanting but when I go to make it an update query, it either prompts me, or it shows 0 records depending on what I swing around. I know I am missing something very simple

MyVal: Mid([Object],3,6) is what I am pulling to get my data. I have been trying to use that in an update query as the source and then trying to get that to write to the update table in field object code.I have a format in there that will add my characters I need before and after the extracted text, I just need to get the data there.

Any ideas on where I am going wrong????

julius.gazdag@centurytel.com
Im a Telco guy, I can get you where you want to go, but I can't guarantee it will work when you get there!
 
UPDATE [NOV24DATES03 Query] SET [NOV24DATES03 Query].MyVal = [update]![Object code];

This is what I get using the builder in 2000. As soon as I hit run, it prompts me for parameter value.

julius.gazdag@centurytel.com
Im a Telco guy, I can get you where you want to go, but I can't guarantee it will work when you get there!
 
>MyVal: Mid([Object],3,6) is what I am pulling to get my data. I have been trying to use that in an update query as the source and then trying to get that to write to the update table in field object code.

but in your query you are updating MyVal with the value of Object code. if you wanted to use MyVal as the source you should write:

UPDATE [update] SET [update]![Object code] = [NOV24DATES03 Query].MyVal;
 
So I did have it backwards.
I tried putting that in, and I still get prompted to enter a parameter. I have tried to change the config of this a couple of times.
UPDATE [update] SET [update].[object code]=[NOV24DATES03 Query].MyVal;

The MyVal query does work, I get the data extract, but when I try to run the update query, in the view feature it is blank, and when I hit run it pulls up a box asking for paramater to MyVal.

julius.gazdag@centurytel.com
Im a Telco guy, I can get you where you want to go, but I can't guarantee it will work when you get there!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top