Solved

IIF BLANK TEXT BOX ISSUE

Posted on 2001-08-17
6
299 Views
Last Modified: 2012-05-04
I have an ADP database that when a value is coming up blank the IIF statement does not work correctly.  For example:

Control Source
=IIF([Rate]="",0[Rate])
 The textbox is still blank.  Any idea?
0
Comment
Question by:InvisibleMan
6 Comments
 
LVL 12

Expert Comment

by:Paurths
ID: 6398699
hi InvisibleMan,

try this:

=IIf(IsNull([rate]);0;[rate])

cheers
Ricky
0
 
LVL 6

Accepted Solution

by:
PsychoDazey earned 15 total points
ID: 6398712
I would use the Nz function.  I think this is what you are trying to do:
Me![Rate].Control Source = Nz(Me.[Rate],0)
0
 
LVL 1

Expert Comment

by:chuck_forbes
ID: 6399115
or

=IIf(IsNull([rate]) Or Trim([rate] = "");0;[rate])

-cf
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 30

Expert Comment

by:hnasr
ID: 6399395
PsychoDazey, Just put the control source property:
=Nz(Me.[Rate],0)  
:)
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6404151
That is what I dis hsanr (refer to my comment above yours)?!?!?  Did you mean to refer that comment to InvisibleMan?
0
 
LVL 30

Expert Comment

by:hnasr
ID: 6404637
PsychoDazey ,
I was referring to your comment, which is now accepted answer, to remove: Me![Rate].Control Source before the equal sign. :)
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

808 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