Update Query

brharrii

Registered User.
Local time
Today, 03:22
Joined
May 15, 2012
Messages
272
I'm trying to run an update query to change the last used date for all products on tomorrow's production report to tomorrow. I would like to be able to type or copy/paste each item number from the schedule into a querry to update them quickly, but I'm running into some problems. This is what I have so far:

Code:
Update tblproductinfo
Set [DateUsed]="08-13-2012"
Where [Itemnumber]=

How would I set it up to just type in all the item numbers and click run to update all dates at once?

Thanks!
 
If you want to update a date to Tomorrows date use;
Code:
Update tblproductinfo
Set [DateUsed]=Date() + 1
Where [Itemnumber]= [COLOR="Green"]'you will need some criteria here[/COLOR]
 
If you had less than 10 records or so your WHERE clause would look like this:

WHERE Itemnumber=1 OR Itemnumber=2 OR Item=3 OR ...

If you have more than that I would put them into a new table, bring that table into the query in design view, link it to the Itemnumber field in tblproductinfo and not use a WHERE clause at all because that link will act as it.
 

Users who are viewing this thread

Back
Top Bottom