Solved

add if check

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The viewer will learn how to implement Singleton Design Pattern in Java.
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…

726 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