473,574 Members | 2,580 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 3246
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
5468
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...
3
3561
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...
2
2201
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...
1
7402
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...
3
5618
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...
2
8848
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>...
1
2460
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...
10
7406
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
3686
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...
0
7808
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...
0
7732
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8243
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...
1
7822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5302
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...
0
3742
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...
0
3754
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.