Home
What is MS Access
Tables
Forms
Queries
Reports
VBA Codes
Learn VBA
Access 2007/10
Access 97
Tips via email
Whats New!
Contact Me
Questions Answered
Access to SQL

[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines

Multiple Criteria Update Query

Multiple Criteria Update Query



This tip Multiple Criteria Update Query is suitable for all versions of Microsoft Access.

Question:

I would like to create an Update Query to update multiple criteria into multiple updates based on the criteria.

For Example: If Field 1 contains "Yellow" or "Green" or "Red", can I update these records in Field 2 with "Caution" or "Go" or "Stop"?

Answer:

First of all, an Update Query updates your records and it cannot be reversed. So, whilst testing out the criteria, I would suggest you make a copy of your table so that you have a back up.

I am presuming the following:

Update Field 2 with 'Caution' if Field 1 is yellow;

'Go' if Field 1 is green and

'Stop' if Field 1 is red?

If this is the case:

In the Update To: row for Field2, type the following:

IIf([Field1]="Red","Stop",IIf([Field1]="Green","Go","Caution"))

The above is known as a Nested IIF statement for an overview then

Click Here




Return from Multiple Criteria Update Query to Simply Access Home Page

or

Return to Microsoft Access Queries


Search Simply Access

Custom Search


Want to learn more for free.

Sign up for Simply Access 'Microsoft Access Tips'. Free useable tips to your in-box each month.

Enter your E-mail Address
Enter your First Name (optional)
Then

Don't worry -- your e-mail address is totally secure.
I promise to use it only to send you Microsoft Access Tips.



If you wish to learn VBA to expand the possibilities of Microsoft Access then

Click Here Just $7.95 for 56 lessons.