Re: Update field with contents of another field
- From: "JohnB" <jbrigan@xxxxxxxxx>
- Date: Tue, 19 Aug 2008 10:28:29 -0400
You were right, I did have a typo. Current_Veh_Location should have been Current_Veh_Loc
But I corrected that... and I still get the same error message. I'm so close!!
I'm Googling for answers, but everything I find points to typo errors. I've looked very closely at the query and find none.
Any other recommendations would be greatly appreciated.
"Michel Walsh" <vanderghast@VirusAreFunnierThanSpam> wrote in message news:e$nIv2fAJHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
Probably a typo: the field is not recognized.
Vanderghast, Access MVP
"JohnB" <jbrigan@xxxxxxxxx> wrote in message news:%230KoPsfAJHA.1016@xxxxxxxxxxxxxxxxxxxxxxxI have a followup question:
I didn't explain the table and field names correctly, but I could figure it out from what you wrote. This is your query with the corrected table/field names:
UPDATE Products INNER JOIN All_Locations
ON Products.ProductStock=All_Locations.Stock_Number
SET Products.Actual_Location = All_Locations.Current_Veh_Location
WHERE Products.Actual_Location IS NULL;
But my problem is; I am getting prompted for information when I run the query. I get a popup window titled "Enter Parameter Value".
With the input box labeled "All_Locations.Current_Veh_Location"
What is causing that prompt?
TIA
"Michel Walsh" <vanderghast@VirusAreFunnierThanSpam> wrote in message news:exF9h1WAJHA.4148@xxxxxxxxxxxxxxxxxxxxxxxUPDATE tableB INNER JOIN tableA
ON tableB.stockNumber = tableA.stockNumber
SET tableB.Location= tableA.Location
WHERE tableB.Location IS NULL
Sure, just in case it does not do what you want, preferable to experiment AFTER having made a backup. An UPDATE can make extensive damage to your data, if not properly done.
Vanderghast, Access MVP
"JohnB" <jbrigan@xxxxxxxxx> wrote in message news:e47EVjWAJHA.4588@xxxxxxxxxxxxxxxxxxxxxxxI now know how to update a field, with text such as "record found", based on the contents of another field.
I use something like this:
update tableb,tablea set tableb.blankfield = "found"
where tableb.stocknumber = tablea.stocknumber
But I need to do something a little different, and I can't figure out how to do this:
I have a file with a link to a table in another file. And just as before, I need to read the StockNumber field in one table and find matching records in the linked table. When I find a match I need to update the contents of Table-B.Location with the contents of Table-A.location
I tried, in place of "found", TableName.FieldName. but I get a message saying Syntax error, missing operator.....
It's probably something simple, but since I've never done this before, I don't know what the correct syntax would be.
TIA
.
- Follow-Ups:
- Re: Update field with contents of another field
- From: Michel Walsh
- Re: Update field with contents of another field
- References:
- Update field with contents of another field
- From: JohnB
- Re: Update field with contents of another field
- From: Michel Walsh
- Re: Update field with contents of another field
- From: JohnB
- Re: Update field with contents of another field
- From: Michel Walsh
- Update field with contents of another field
- Prev by Date: 2 Differnt Parameter
- Next by Date: Re: Upsize to SQL
- Previous by thread: Re: Update field with contents of another field
- Next by thread: Re: Update field with contents of another field
- Index(es):
Relevant Pages
|