Solved

add if check

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 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