Solved

add if check

Posted on 2007-03-21
2
127 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
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 250 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now