Īccess updates the selected records by raising both their Normal Price and First Class Price fields by 10 percent.Īccess asks about the updating the selected records, as shown in figure.(down arrow key) to select the TourID field's fourth Criteria row and type 9.Ĭompare your query to the one in figure. (down arrow key) to select the TourID field's third Criteria row, type 3, press the This will select the records whose TourID is "2." Go to the next step and finish adding the rest of the OR criteria. (down arrow key) to select the TourID field's second Criteria row (the or row) and type 2. This will select the record whose TourID is "1," but what about the rest? Ĭlick the TourID field's Criteria row and type 1.You will have to create an OR statement in your query to make sure you get them all. Here are all the European TourIDs: 1, 2, 3, and 9. Sadly, the only way to determine this is by looking at the values in the tblTours table. You want to raise prices for only those tours that are in Europe. Next you need to specify any limiting criteria.
#MICROSOFT ACCESS UPDATE QUERY UPDATE#
Ĭlick the First Class Price column's Update To row and type:.Make a little more sense? Hope sobecause you have to do the same thing to the First Class Price field. Access then adds this $10 to the Normal Price (as in $10 + $100) and comes up with $110. 1).Īccess first calculates anything it sees in parentheses, so it multiples $100 x 0.1 (or 10%) and comes up with $10. The expression would then look something like this: + ( *. So what does this confusing expression actually mean? Let's assume the Normal Price for a record is $100. Ĭlick the Normal Price column's Update To row and type +(*.1).
![microsoft access update query microsoft access update query](https://bytes.com/attachments/attachment/7331/updateprimaryqry.jpg)
You want to raise the price of both the Normal Price and First Class Price fields by 10 percentyou will have to write an expression (or formula) in the Update To rows of both fields to make this little bit of magic happen.
#MICROSOFT ACCESS UPDATE QUERY HOW TO#
The next step is a little bit trickyyou have to tell Access which fields to update and how to update them.
![microsoft access update query microsoft access update query](https://i.ytimg.com/vi/Q-lIMrDCBPo/maxresdefault.jpg)
![microsoft access update query microsoft access update query](https://support.content.office.net/en-us/media/ff010648-65f5-40ee-90f4-caff38591a36.gif)
Now you need to convert the select query to an update query. ĭouble-click the tblTours table and click Close.Here you have to select the tables and/or queries you want to use in the update query. The query design window and Show Table dialog box both appear. In this lesson you will create an update query to raise the prices of all trips to Europe by 10 percent.įrom the Database window, click the Queries icon in the Objects bar and click the New button. An query.Īccess asks you to confirm the record update. Just like other action queries, you create an update query by first creating a select query and then converting the select query to an update query.