?
Solved

Conditional format or similar on form checkbox

Posted on 2014-01-28
11
Medium Priority
?
404 Views
Last Modified: 2014-01-29
On a small form I've used conditional formatting to make some empty rows between the choices - but how can I hide the check boxes on the "empty" rows ? Database running on Access 2003/2010.

Choice list
0
Comment
Question by:Bojerne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
11 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39814612
You can't format a checkbox, and you can't set it's visible property to false with conditional formatting.

A possible workaround is to use a textbox to simulate a checkbox, and use conditional formatting to hide/show that textbox instead.
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39814912
Hi,

Another method is to create an empty text box with the background and border the same color as the form background.  Place the textbox over the CheckBox and use conditional formatting to make it visible or not, essentially hiding the CheckBox behind it.

Regards,

Bill
0
 
LVL 1

Author Comment

by:Bojerne
ID: 39815233
You both suggest to show/hide a textbox - but it's not possible to show/hide a textbox - only to activate/inactivate the textbox, which will not look nice :) Otherwise a really good suggestion.
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 61

Expert Comment

by:mbizup
ID: 39815412
Understood - as you noted there is no option for 'visibility' in conditional formatting.

Our explanations might not have been clear, but the idea is to toggle text and/or background colors to disguise the textbox instead.  ie: if you have a borderless textbox whose font and backcolor are the same as the detail section, then that textbox is effectively not visible.
0
 
LVL 1

Author Comment

by:Bojerne
ID: 39815424
I can understand that ie a textbox with white text and backgound can hide the underlying checkbox - but I don't see how I the can make the checkbox visible ? And as it's unfortunately not possible to conditional format the border, the textbox cannot be made to look like a checkbox :) ?
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39815884
Hi,

Make the border transparent.  All you want to do is cover the checkbox.

Regards,

Bill
0
 
LVL 1

Author Comment

by:Bojerne
ID: 39816954
Hi Bill

I'm probably a bit slow here but I can understand that ie a textbox with white text and backgound can hide the underlying checkbox - but I don't see how I the can make the checkbox visible Again when I can't hide the textbox ?
Thanks
Mike
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39817738
Hi Mike,

Create a text box with a transparent border and background.  
Please it over the checkbox - it will be invisible and the checkbox will show.
Use conditional formatting to make the background of the text box the same color as forms detail area background when the checkbox needs to be hidden.

Post your db and I'll get you started.

Thanks,

Bill
0
 
LVL 1

Author Comment

by:Bojerne
ID: 39817829
You can't do that - the backgruond of the textbox, will change from Transparent to Normal (ie solid) when you start using conditional formatting.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39818009
This is the idea I was trying to describe, using a textbox to simulate a checkbox.  Try frmTest in the sample db.

That said.... What you are trying to do is ultimately and simply *not possible* in Access, so you will have to find a livable workaround (which as workarounds go, is unlikely to look or behave 'exactly' as you want it to).

Further, the purpose of conditional formatting in general is to make certain values stand out.  Hiding entire records just strikes me as contrary to that purpose.  So I'm curious about things like:

1.  How many rows of data are we talking about?
2.  What are the rules involved in hiding specific records?
3.  What is the overall reason for hiding these records?

There may be a better approach than conditional formatting to handling these "gaps" in your data presentation.
HideCheckBox.accdb
0
 
LVL 1

Author Comment

by:Bojerne
ID: 39818033
Hi MBizup
Thank you for the example. I suspected it wasn't possible to do what I was wishing for - but wanted to be sure. Your example is a good alternative :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …
Suggested Courses

752 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