Hiding an empty value

  • Thread starter Thread starter Jonathan Blitz
  • Start date Start date
J

Jonathan Blitz

How can I hide a control if the value in it is blank?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Hi Jonathan,

Thanks for your post. I am quit clear what your accurate concern is. I
would like you to provide more information so that I can fully understand
what you want to do.

1. Which control do you indicate?
2. Which value do you indicate?
3. Can you provide a specified sample to show your concerns?

As I understand, the control in Access generally has a Visiblity property.
We are able to hide the control by setting this property.

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I have a form which displays data in continuous form format.

I have certain fields in the deatils section that may be empty.

What I want to do is hide these fields on the rows where they have no value.



--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Hi Jonathan,

Thanks for your feedback. I understand that you want to hide the control
box when the value in the control box is NULL in the continuous format. If
I have misunderstood, please feel free to let me know.

Please check and see the suggestions in the following article, they should
meet your requirements.

193207 ACC: Displaying Colors Based on a Condition in Continuous Forms
http://support.microsoft.com/?id=193207

304104 How to Programmatically Apply Conditional Formatting Settings to All
http://support.microsoft.com/?id=304104

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Jonathan,

If it's on a Single view form, you could use code on the Current event
of the form...
With Me.NameOfYourControl
.Visible = Not IsNull(.Value)
End With

If it's on a Continuous view form, it may be possible to use
Conditional Formatting to simulate the control being hidden by
adjusting the ForeColor and BackColor of the control to match the
BackColor of the form's section.

- Steve Schapel, Microsoft Access MVP
 
Back
Top