Solved

How to test if a control has data

Posted on 2010-08-20
3
259 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 33484225

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

Author Closing Comment

by:mekah
ID: 33484381
Thanks
0
 
LVL 30

Expert Comment

by:hnasr
ID: 33484398
 = IIf(Field1 <> " ", "X", Field1)
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

Suggested Solutions

Title # Comments Views Activity
VBA Access 2016 syntax 6 44
Trying to force an answer in a combobox 7 18
Field naming convntions - MS Access 7 29
Display <> "Yes" records 10 10
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

810 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