• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

Hide a textbox based on a Parameters value

I am trying to hide a textbox based on a report parameters value. Currently I have my code as =IIF(Parameters!HasAccess.Value = "ok1", True, False). The problem is the value for HasValue is actually "ok", but the textbox is still showing up. What am I doing wrong?
=IIF(Parameters!HasAccess.Value = "ok1", True, False)

Open in new window

0
NickMalloy
Asked:
NickMalloy
  • 4
  • 3
1 Solution
 
Simone BSenior E-Commerce AnalystCommented:
It looks like what your IIF statement is saying is:

If the parameter has value ok, then Hidden = True, otherwise Hidden = False

Try switiching your True and False
0
 
NickMalloyAuthor Commented:
That didn't work.
=IIF(Parameters!HasAccess.Value = "ok", False, True)

The Textbox should be visible and it is not. No matter what my value is in the pram
0
 
Simone BSenior E-Commerce AnalystCommented:
Is the data type of the field char or boolean? It could be that the display is "ok" but if it's a boolean field, the actual value would probably be 1. If that's the case, try this:

=IIF(Parameters!HasAccess.Value = 1,False, True)

0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
NickMalloyAuthor Commented:
It is a char and not a boolean. The value is just text from a database.
0
 
NickMalloyAuthor Commented:
Damn case sensativity.
0
 
Simone BSenior E-Commerce AnalystCommented:
Just to check: Is your IIF statement in the textbox's Properties > Visibility tab > Initial Visibility: Expression ...?
0
 
Simone BSenior E-Commerce AnalystCommented:
:)
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

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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