Stupid Question

1. Senior Member
Join Date
Dec 1969
Posts
508

## Stupid Question

I just wanted to find out what this statement does or better yet, what it is saying.<BR><BR>If Not(Trim(Session("txtB1NLast") & Session("txtB1NFirst") & Session("txtB1SSNbr") & Session("txtB1Employer")) = "") Then<BR> ShowB1Info = True<BR>End If<BR><BR>Is it saying, none of the sesssion are equal to "", then set showb1info=true<BR><BR>

2. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## RE: Stupid Question

If any of them are NOT blank, then set ShowB1Info to True.

3. Senior Member
Join Date
Dec 1969
Posts
199

## RE: Stupid Question

yes thats what it means<BR>could also be written <BR><BR>if not session("blah") = "" and not session("blah") andnot...<BR>then

4. Senior Member
Join Date
Dec 1969
Posts
508

## RE: Stupid Question

Thank you

5. Ian
Senior Member
Join Date
Dec 1969
Posts
736

## RE: Stupid Question

Hmmm, I disagree...<BR><BR>The original statement effectively says - if any of the terms are non null then the conditional is positive.<BR><BR>But your statement says - if all of the terms are non null the conditional is positive.<BR><BR>It should be...<BR><BR>if not session("blah") = "" or not session("blah") or not...<BR>then<BR><BR>When you apply a global negation to a series of terms, the ands goto or&#039;s.<BR><BR>I.

6. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## Parenthesis..

.. affect the order of processing:<BR><BR>If Not(Trim(Session("txtB1NLast") & Session("txtB1NFirst") & Session("txtB1SSNbr") & Session("txtB1Employer")) = "") <BR><BR>Is the same as saying:<BR>If Not(X = "")<BR><BR>So, that still equates to If X is not blank, then do this.<BR><BR>X is just the combination of all of the various strings.

7. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: Stupid Question

If Not(Trim(Session("txtB1NLast") & Session("txtB1NFirst") & Session("txtB1SSNbr") & Session("txtB1Employer")) = "") Then<BR> ShowB1Info = True<BR>End If <BR>The session variables are being made into one long string Then trimmed to take away the spaces and then compare to empty string and if not an empty string then showB1Info is true

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•