Solved

How to test if a control has data

Posted on 2010-08-20
3
255 Views
Last Modified: 2013-11-28
Here is my code.
=IIf([Field1]="Yes","X"," ")

This code will mark my field with an X if Field1 has Yes in it. What do I replace Yes with if the field has any data in it? Even better but not a big deal is if field1 has any data other than a space.
0
Comment
Question by:mekah
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility

IIF(Len(Trim([Field1]) & "")>0,"X","")
0
 

Author Closing Comment

by:mekah
Comment Utility
Thanks
0
 
LVL 30

Expert Comment

by:hnasr
Comment Utility
 = IIf(Field1 <> " ", "X", Field1)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

763 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

12 Experts available now in Live!

Get 1:1 Help Now