Solved

Conditional format or similar on form checkbox

Posted on 2014-01-28
11
397 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
 
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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…

919 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

18 Experts available now in Live!

Get 1:1 Help Now