Solved

IIF BLANK TEXT BOX ISSUE

Posted on 2001-08-17
6
296 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

21 Experts available now in Live!

Get 1:1 Help Now