Solved

How to test if a control has data

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

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)

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…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

863 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

24 Experts available now in Live!

Get 1:1 Help Now