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.