Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
 
 
Access Tip: Switch Function
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   7 years ago

textWow, it's been TOO long since I've released an Access Tip Video. Let's take care of that right now.

Here's a new tip that shows you how to use the SWITCH FUNCTION which is an alternative to using multiple, nested IIF functions. Enjoy.

RR

Access Tip Switch Function Upload Images   Link 
David S 
7 years ago
Should not the default be HDCP>16,"C" rather than just "C"?  
The Switch function evaluates each expression in turn and if it evaluates as True then the value that follows that expression is returned.  If more than one expression is True then the value for the first True expression is returned with the others being ignored.  However there must be an expression followed by the return, and in your case there is no expression preceding "C". Read More...
Add a Reply
Access Tip Switch Function Upload Images   Link 
Robert S 
7 years ago
I tried that and it does not appear to work.
Grade:SWITCH(HDCP<=12,"A",HDCP<=16,"B","C")




Reply from Alexander Hedley:

Do you get a particular error?

Does your Table contain a Field named "HDCP" Read More...
Add a Reply

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

You may want to read these articles from the 599CD News:

5/9/2021Access D29 Started
5/9/2021Access Developer 30
5/9/2021Access Developer 30 Lessons
5/9/2021Access Developer 30
5/8/2021Data Entry
5/2/2021Split Commissions
4/30/2021Close Form
4/30/2021Close All Forms
4/29/2021Quick Queries #3
4/26/2021Combining Names
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: switch function iif  PermaLink