If/Then in SQL Embedded in VBA -


I have found a string in my Excel VBA:

  strSQL = "select * From the total (simulation id = ("& Textbox1.Text and") and Test1 = ("& amp; Example & amp;") " 

However, Will be 'null', which creates a query

  and example = zero  

How do I add it to either statement or something It is called

  and the example is zero  

When is the value of the example "zero"?

< P>

I would recommend comparing the faucet before collecting the SQL statement strSQL. If you check the value of the first instance, then you Based on that investigation, you can change your strSQL description accordingly.

EDIT: In response to Daniel's first and second comments, I would still like the following if this (inline = 1) = "And example 1 is zero" if (example 2 = null) then inline:

dim strSqlTai L strSqlTail = ""

if (example 1 = null) then strSqlTail = "and Example 1 is tap" StrSqlTail = strSqlTail & amp; "And example 2 is tap"
if (example 3 = null) then strSqlTail = strSqlTail & amp; "And example 3 IS null"

...

Note: SRQLTL can work on your situation, because I did not understand what the sample is being asked.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -