473,915 Members | 4,402 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 4277
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
8096
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
1918
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
29982
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
9541
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
2020
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
1513
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
4279
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
1651
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
8661
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
10039
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
9881
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
11354
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...
1
11066
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10542
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
5943
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
6148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4778
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
4344
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.