Rabu, 11 Desember 2013

RE: [MS_AccessPros] Proper use of Switch in Access 2010 Query

 

John,

 

I am doing this in a query.  Here is the problem.  I am querying license and certification data from our database.  While some of the results have the proper code in the [Lic State] field others are blank.  Depending on the license/certification the [Lic State] field needs the two letter state abbreviation the where the employee works, where the license was awarded or where the employee calls their home state.

 

Thanks,

 

Bill

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John Viescas
Sent: Tuesday, December 10, 2013 4:13 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Proper use of Switch in Access 2010 Query

 

 

Bill-

If you're assigning the result to the Work State field, then maybe yes. Are
you doing this in code, a query, or what? What is the business problem
you're trying to solve?

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of William
Sent: Tuesday, December 10, 2013 10:40 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Proper use of Switch in Access 2010 Query

Rather than driving myself crazy with a nested IIF statement I want to use
the Switch function. After reviewing the syntax for the function I have a
question. Will a statement like Switch([Lic Cert Code] = "ABC" AND [Lic
State] IS NULL, [Work State]) evaluate properly and place the current value
of [Work State] in the [Lic State] field? If not what would? I have
multiple cases and a nested IIF statement would get ugly. Thanks in
advance!

Bill

------------------------------------

Yahoo Groups Links



The information contained in this communication, including attachments, is confidential and private and intended only for the use of the addressees. Unauthorized use, disclosure, distribution or copying is strictly prohibited and may be unlawful. If you received this communication in error, please inform us of the erroneous delivery by return e-mail message from your computer. Additionally, although all attachments have been scanned at the source for viruses, the recipient should check any attachments for the presence of viruses before opening. Alegent Creighton Health accepts no liability for any damage caused by any virus transmitted by this e-mail. Thank you for your cooperation.

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar