Hiding an empty value

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."
 
Y

Yuan Shao

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.
 
J

Jonathan Blitz

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."
 
Y

Yuan Shao

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.
 
S

Steve Schapel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Thought you should see this 1
Hding menu bar 2
Show gif while form is "thinking" 9
Leave button pushed in 2
Weird message 5
Problems with OrderBy 3
Set value in non-displayed fields 2
Renaming controls en-mass 1

Top