Solved

IIF BLANK TEXT BOX ISSUE

Posted on 2001-08-17
6
295 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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
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)

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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 …

708 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

13 Experts available now in Live!

Get 1:1 Help Now