?
Solved

add if check

Posted on 2007-03-21
2
Medium Priority
?
134 Views
Last Modified: 2010-04-30
I need to add a check for a level 4 to display a serial number rstSelect![serial_number]  

The current code loks like the one below:
p_vntSalesOrderDetails(3, intRecordCount) = IIf(rstSelect![Level] = 1, rstSelect![art_descr], Trim(rstSelect![physical_article]) + " - " + rstSelect![art_descr] + rstSelect![serial_number])


before the + rstSelect![serial number] I need to add something like IIf(rstSelect![Level] = 4, rstSelect![serial_number]

i just don't know the correct syntax on this
0
Comment
Question by:itortu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:itortu
ID: 18767725
i am using vb6 by the way.

thank you for your help.
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 1000 total points
ID: 18767740
Try with a null..

p_vntSalesOrderDetails(3, intRecordCount) = IIf(rstSelect![Level] = 1, rstSelect![art_descr], Trim(rstSelect![physical_article]) + " - " + rstSelect![art_descr] + IIf(rstSelect![Level]=4,rstSelect![serial_number]), Null)

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This video teaches viewers about errors in exception handling.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question