Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IIF BLANK TEXT BOX ISSUE

Posted on 2001-08-17
6
Medium Priority
?
307 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 60 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 31

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 31

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

783 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