473,699 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hide unchecked checkboxes on a report

WyvsEyeView
46 New Member
I have a report on which each record could potentially display three checkboxes...ca ll them chk1, chk2, chk3. To minimize clutter on the page, I only want to display the labels of the checkboxes that are checked. I have not been able to find any way to test the value of these checkboxes using any of the report events. Access's conditional formatting doesn't allow you to hide a control based on conditions. Any ideas? Thanks!
Aug 5 '08 #1
1 3248
missinglinq
3,532 Recognized Expert Specialist
Actually, you can hide a control using Conditional Formatting, you just have to be tricky and change the Fore color if the condition is met! But you can't use CF for anything with checkboxes, so you need to be tricky again. There may be a slicker way to do this, but this will work!

First off, create a small rectangle and place it over each checkbox. Name them chk1Cover, chk2Cover and chk3Cover. Set their Border Style to Transparent. Now place this code behind your report:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.  If Me.chk1 = 0 Then
  3.   Me.chk1Cover.Visible = True
  4.  Else
  5.   Me.chk1Cover.Visible = False
  6.  End If
  7.  
  8. If Me.chk2 = 0 Then
  9.   Me.chk2Cover.Visible = True
  10.  Else
  11.   Me.chk2Cover.Visible = False
  12.  End If
  13.  
  14. If Me.chk3 = 0 Then
  15.   Me.chk3Cover.Visible = True
  16.  Else
  17.   Me.chk3Cover.Visible = False
  18.  End If
  19.  
  20.  End Sub
Linq ;0)>
Aug 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5480
by: Pete | last post by:
I have some session variables which get set on page one of my site. I can set an unset these by passing through a parameter in some URL's. When the user goes to the second page some checkboxes are checked if their corresponding session variable is set and has a value of "true". The problem I have is that if the user unchecks a checkbox before finally moving to page three (which is perfectly okay for them to do if they wish) then I need...
3
3564
by: Terence Parker | last post by:
I'm not sure whether this question demands a JavaScript answer or a simple HTML one - so apologies for the cross posting. I am grabbing a bunch of data from MySQL using PHP and returning the results, row by row, to the user. These results are returned in a form (for editing) and then submitted back out again as an array (since the field names are repeated), e.g : <form type="text" name="subject">
2
2207
by: Glenn | last post by:
The following script is supposed to have high categories as radio buttons and mid categories as check boxes. Clicking the radio button is supposed to select all checkboxes under it and submit the form. RADIO (ID = 0001-1 VALUE="") CHECK (ID=0001-0011) CHECK (ID=0001-0012) RADIO (ID = 0001-2 VALUE="") CHECK (ID=0001-0021) CHECK (ID=0001-0022)
1
7412
by: jbreaker | last post by:
Hi - I have a table with about 30 rows, which contain a checkbox and a bit of text each. What I'm trying to find a way to do is to have 2 buttons at the bottom of the page - HIDE & SHOW. When the HIDE button is clicked, I need to hide all the table rows which contain UNCHECKED textboxes. When the SHOW button is clicked, I want to restore the visibility of all the rows. I need to do this in JavaScript (which is what I'm having trouble with)...
3
5622
by: somaskarthic | last post by:
Hi How to get the values of dynamically created checkboxes which are checked and unchecked (for both the conditions). Only the selected checkbox values are posted as 'On' . How can i get the value of unchecked checkboxes ? Each row contains 7 checkboxes. These rows are created dynamically by clicking a button. When the page is posted , i need to get the values as row1 checkbox1 = selected checkbox2 = notselected checkbox3 = selected...
2
8860
by: TGEAR | last post by:
there is one check box and if it is checked, then shows several fields underneath; otherwise, several fields are hidden. the default is unchecked. anyone can share the code for this function? <table> <tr><td><input type="checkbox" name="vehicle" value="N" /><td></tr> <tr><td><input type="text" name="color" value="test" /><td></tr> <tr><td><input type="text" name="shape" value="test" /><td></tr>
1
2469
by: ttamilvanan81 | last post by:
Hai i have using the checkbox in for loop. I need the urgent help from anyone, for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can...
10
7413
by: k3pp0 | last post by:
Hello. Here's my example form: <form method="get" action=""> <p> <input type="radio" name="radio_example" id="radio1" value="radio1_val" /> <label for="radio1">radio button one</label> </p>
6
3702
by: beary | last post by:
This is embarrassing, but I have a form pulling data from mysql using php. Lots of different checkboxes in it. When user checks one or more boxes, all goes well; values are added and db is updated. And some php script makes sure those same checkboxes are then checked when page is reloaded. Here's the problem: if I now uncheck one or more of those (automatically when the page loads) checked checkboxes and then do a submit, the form still...
0
8705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9197
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.