Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

How to test if a control has data

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
mekah
Asked:
mekah
1 Solution
 
Rey Obrero (Capricorn1)Commented:

IIF(Len(Trim([Field1]) & "")>0,"X","")
0
 
mekahAuthor Commented:
Thanks
0
 
hnasrCommented:
 = IIf(Field1 <> " ", "X", Field1)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now