473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check Box clearing

Please help guys, i am trying to set up a database here at work and im
fairly new to access in terms of writing functions and queries and
stuff. I have 2 different places on my design that will require
checking a check box to tell which category something will pertain to.
Well after each record is entered i want the check to remain with that
record and auto clear when going to the next record so i can input
something else if i have a different type of problem. The check keeps
staying checked on every record and wont stay locked to that one
record. This has got to be possible right? Also if its an expression
your going to give me to put in do right click, go to properties and
enter the expression or funtion in that way? Please let me know, thank.

2nd problem........

Now once i can get where they are staying checked with each record i
want to also be able to have a query showing those records that have
each one checked. Is it possible to create a query from a check and if
so then how? I dont know if it will matter how the check box was
created or not to make it bound or unbound. I just went under design
view and added a box that way. Will that matter? Or do i have to
somehow have to have it as one of the choices on my table some how?
Hope all this is making sense, im trying to explain the best i know
how. Please help me. Thanks a lot.

Feb 24 '06 #1
1 4264
It definitely matters how the check box is created. It sounds like you
created an Unbound checked box. Hence, when you move from record to record,
the check remains. Do the following to correct this problem.

1. Open the form in Design Mode
2. Rt click the CheckBox and select Properties
3. Click the Control Source Property and select the Drop Down Box.
4. Select the "Field" you want to Bind to. (Please note if you don't see
it listed, you will have to add that field to the Form's underlying
Recordsource
5. Name the Check Box with the same name as the underlying field (not
totally needed, but good practice).

The second item is a little more intricate to explain, but can be done.

1. Create an Unbound CheckBox in the Form (Normally toward the top away
from the "Bound Fields"
2. Right Click the CheckBox and select Properties
3. Scroll Down and find the On Click "Event". Click in it and click the
Build (3 dotted button) and select Code Builder
Now let's say I have a CheckBox called chkActiveEmploy ee and the underlying
form is bound to a table called tblEmployees with the following fields.
FirstName Text
LastName Text
ActiveEmp Yes/No

In the Click event, I would write the following code.

Sub chkActiveEmploy ee_Click

Dim strSql as String
strSql = SELECT * FROM tblEmployees WHERE ActiveAmp = " &
Cbool(me.chkAct iveEmployee.Val ue)
me.RecordSource = strSql

End Sub

Each time the Check box is clicked, it would filter the form based on the
selection in the check box to display either active or inactive employees.
Hope this helps.

----- Original Message -----
From: <sc************ @aol.com>
Newsgroups: comp.databases. ms-access
Sent: Friday, February 24, 2006 3:44 PM
Subject: Check Box clearing

Please help guys, i am trying to set up a database here at work and im
fairly new to access in terms of writing functions and queries and
stuff. I have 2 different places on my design that will require
checking a check box to tell which category something will pertain to.
Well after each record is entered i want the check to remain with that
record and auto clear when going to the next record so i can input
something else if i have a different type of problem. The check keeps
staying checked on every record and wont stay locked to that one
record. This has got to be possible right? Also if its an expression
your going to give me to put in do right click, go to properties and
enter the expression or funtion in that way? Please let me know, thank.

2nd problem........

Now once i can get where they are staying checked with each record i
want to also be able to have a query showing those records that have
each one checked. Is it possible to create a query from a check and if
so then how? I dont know if it will matter how the check box was
created or not to make it bound or unbound. I just went under design
view and added a box that way. Will that matter? Or do i have to
somehow have to have it as one of the choices on my table some how?
Hope all this is making sense, im trying to explain the best i know
how. Please help me. Thanks a lot.

<sc************ @aol.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. . Please help guys, i am trying to set up a database here at work and im
fairly new to access in terms of writing functions and queries and
stuff. I have 2 different places on my design that will require
checking a check box to tell which category something will pertain to.
Well after each record is entered i want the check to remain with that
record and auto clear when going to the next record so i can input
something else if i have a different type of problem. The check keeps
staying checked on every record and wont stay locked to that one
record. This has got to be possible right? Also if its an expression
your going to give me to put in do right click, go to properties and
enter the expression or funtion in that way? Please let me know, thank.

2nd problem........

Now once i can get where they are staying checked with each record i
want to also be able to have a query showing those records that have
each one checked. Is it possible to create a query from a check and if
so then how? I dont know if it will matter how the check box was
created or not to make it bound or unbound. I just went under design
view and added a box that way. Will that matter? Or do i have to
somehow have to have it as one of the choices on my table some how?
Hope all this is making sense, im trying to explain the best i know
how. Please help me. Thanks a lot.

Feb 25 '06 #2

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

Similar topics

18
8088
by: Niels | last post by:
Hi group, I have some problems with clearing floated divs. My usual method works fine in Konqueror, but not in Firefox. Here's an example: <html><body> <div id='left' style='float:left; border:1px solid red;'>Floated left</div> <div id='right' style='float:right; border:1px solid blue;'>Floated right</div>
0
1907
by: Gary | last post by:
I have a problem with the datagrid not clearing when the datasource changes, a few fields remain on the screen and even when new data would fill those grid squares the old data remains. I wind up with 101 Another field
7
29920
by: Tony Johnson | last post by:
Can you make a check box very big? It seems like when you drag it bigger the little check is still the same size. Thank you, *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
4
9534
by: Roubles | last post by:
Hi All, Quick question; what is the difference between initializing and clearing a structure like this: mystruct_t a = {0}; and initializing and clearing it like this:
1
2014
by: raghavendra | last post by:
Hi, i am facing problem clearing screen in console application. As, in C++ we have clrscr(); Is? their any similar type of function is avaliable.. Raghavendra...
9
1502
by: Werner Hempel | last post by:
Hello, I'm trying to do a simple three column layout, with two divs (#left and #right) floating left and right, and the #content-div with margins in between, and all three in a wrapper-div. The goal is to get equal height columns (with #content having another background-color than the two other divs). The two divs on the sides and the wrapper get the same background-color #222, and the content-div gets #555. All works fine, as long as...
65
4226
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the difference is between these and: (3) mylist =
0
1634
by: negmat | last post by:
Hello everyone, I have the following question: I am aware that the objects currently in the cache can be viewed by issuing the following command: SELECT * FROM master.dbo.Syscacheobjects Further, cache contents can be cleared by issuing the following command:
65
8629
by: Leslie Kis-Adam | last post by:
Hi everyone! Does anyone know, if it is possible to clear the screen in ANSI C? If it is,then how? Any help would be appreciated. Laszlo Kis-Adam <dfighter_AT-NOSPAM_freemail.hu
0
8787
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9473
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
9208
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6750
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
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
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
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
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.