Solved

Conditional format or similar on form checkbox

Posted on 2014-01-28
11
396 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
  • 5
  • 3
  • 3
11 Comments
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
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
Comment Utility
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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 14

Expert Comment

by:Bill Ross
Comment Utility
Hi,

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

Regards,

Bill
0
 
LVL 1

Author Comment

by:Bojerne
Comment Utility
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
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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 …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now