Solved

Conditional format or similar on form checkbox

Posted on 2014-01-28
11
401 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
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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 500 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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 …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

830 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