Solved

add if check

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

717 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