473,379 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Clearing checks in column of Check Boxes

How can you clear a column of check boxes? In this particular data
base I have a field called "code" and it's the way to choose which
records to print. How can I then clear them in one fell swoop?
Nov 12 '05 #1
2 1366
On 21 Jan 2004 14:56:32 -0800, ca****@mcn.org (B Blue) wrote:
How can you clear a column of check boxes? In this particular data
base I have a field called "code" and it's the way to choose which
records to print. How can I then clear them in one fell swoop?


Use an update query, or run code behind a command button.

Here's the code behind a command button:
CurrentDb.Execute "Update YourTable Set YourTable.CheckBoxField =
No;", dbFailOnError
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
Nov 12 '05 #2

"B Blue" <ca****@mcn.org> wrote in message
news:b5**************************@posting.google.c om...
How can you clear a column of check boxes? In this particular data
base I have a field called "code" and it's the way to choose which
records to print. How can I then clear them in one fell swoop?


You could use the following code:

''''''''''''''''''''''''
Dim ctrl As Control

For Each ctrl In Me.Controls
If (TypeOf ctrl Is CheckBox) Then
ctrl.Value = False
End If
Next
''''''''''''''''''''''''

If you wanted to only untick some boxes, you could set the Tag property of
the tickboxes you wanted unaffected and test for it in code e.g.
If (TypeOf ctrl Is CheckBox) And ctrl.Tag <> "9" Then
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Savvas | last post by:
Hi everybody, I have a lot of textboxes on my form and a "Clear" button. Is there a way with a for loop or something to clear the textboxes, instead of writing textboxName.clear? Thanks a lot
3
by: Alex Wisnoski | last post by:
I have an edit record form with several text boxes, combo boxes, and check boxes. All of them are bound except for one combo box (cboPositionData), which I use to search for a specific record. I...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
3
by: Brad | last post by:
I'm working with a DataGrid in C#, and the user needs to be able add and remove columns from the DataGrid on the fly, without opening and closing the form. The scenario is this. I have a setup...
80
by: Andrew R | last post by:
Hi I'm creating a series of forms, each with with around 15-20 text boxes. The text boxes will show data from tables, but are unbound to make them more flexible. I want the form to be used...
1
by: RLN | last post by:
Re: Access 2003 I found a method here in the newsgroup that works for clearing checkboxes, but don't understand a particular line of code and how it works. Here is the code: 1. Dim ctrl As...
7
by: ljungers | last post by:
Have Form-1 with 3 text boxes and 1 command button. With any of the 3 boxes filled out and button is clicked, a Macro is performed that Opens a Query that has a WHERE clause that uses the 3 test...
12
by: ljungers | last post by:
I'm on the home streach of my project and found that my "Reset for New Search" command button not working as desired. What should happen is that when the button is clicked a Event Procedure is run....
3
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
Hi, I have a GridView with a checkbox column in it called FromInsight, however this is not bound to the dataset, its value is based on another column from the dataset called sourceid For each...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.