Kamis, 05 Desember 2013

RE: [MS_AccessPros] Case Statement

B,

Evaluation of code stops after the first true expression/case. Skips all remaining Case statements.

This should be very easy to validate by adding a breakpoint at the SELECT CASE line and stepping through your code.


Duane Hookom MVP
MS Access

________________________________
> To: MS_Access_Professionals@yahoogroups.com
> From: bmorris.gm@gmail.com
> Date: Thu, 5 Dec 2013 15:40:42 -0500
> Subject: [MS_AccessPros] Case Statement
>
>
>
>
> Question about Case evaluations
>
> I have the Select-Case statement:
>
> Select Case
>
> Case 1 then do 1
>
> Case 2 then do 2
>
> Case 3 then do 3
>
> Case 4 then do 4
>
> Case 5 then do 5
>
> Case Else do 6
>
> End Select
>
> Question is – is each Case evaluated or if Case 2 is true, then Cases
> 3-5 are not evaluated (even if Case 5 is also true)?
>
> I've got a flakey evaluation and need to know if I have to rethink my
> parameters or order in the Cases
>
> Thanks,
>
> B
>
>
>

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

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/

Tidak ada komentar:

Posting Komentar