Update Function

  • Thread starter Thread starter Sol
  • Start date Start date
S

Sol

I know that to change the price in a query I have to use the Update function.
However, I don’t know the exact syntax for it.

Example: I need to change the price of all the $25.00 values to $25.50

Can anyone help please?
Salomon
 
Backup database!
I recommend running a select query on the criteria 25 first to see if there
are records that should not be update and if so add more criteria.
Field: YourField
Update To: 25.5
Criteria: 25.0
 
Thank you for your help, but nothing got updated. The following is actually
the problem that I am working on:

Use an update query to change the price of any book in the Fiction table
with a current price of 14.00 to 14.50

Maybe with this additional info you will be able to more specifically
elaborate.
Thank you again,
Salomon
 
Open your query in design view, click on VIEW - SQL View, highlight all,
copy, and paste in a post.
 
Thank you Karl for your reply,

I tried that but did not help, can you try once more please?

Thank you,
Salomon
 
Pardon me for jumping in.

Open a query
Add your table
Add the Price Field
Select Query: Update from the menu
In the UPdate to: enter the new price
In the criteria: enter the old price
Select Query: Run from the menu.

If you simply switch views, the update query will not execute. It will only
show you what it will be updated if you execute (run) the query.


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Hello John no needs to apologize, and thank you for jumping in I appreciate it.
However, I did it and it worked, but for some strange reason I did not save
it. I then tried again with the exact same instructions and it does not
update, a message pops up telling me "You are about to Update 0 Rows".
Any suggestions?

Thank you again,
Salomon
 
Hi John,

Disregard my previous message and I need to apologize to you now. I thought
that the query was lost but not, I just noticed that it was saved. Looks like
since this type of activity was performed already, a second one could not be
done that is why I was receiving this message.

Thank you very much,
Salomon
 
Hi John,

Disregard my previous message and I need to apologize to you now. I thought
that the query was lost but not, I just noticed that it was saved. Looks like
since this type of activity was performed already, a second one could not be
done that is why I was receiving this message.

It didn't update any records because there were no records in the table with
the old price - they'd all been updated already!
 
Back
Top