I have set up a form allowing users to select items from a list. After the
user makes their selections, they run a query that provides them with their
list. Once this is done, I'd like to have the records deselected (so all
yes/no check boxes are blank). How do I accomplish this? The check boxes
don't reset when the form is exited and then reopened. Thank you very much.
In code behind the form, perhaps in the form's Close event:
Me!Checkbox1 = False
Me!Checkbox2 = False
...
Regards
Jeff Boyce
Microsoft Office/Access MVP
>I have set up a form allowing users to select items from a list. After the
> user makes their selections, they run a query that provides them with
[quoted text clipped - 3 lines]
> don't reset when the form is exited and then reopened. Thank you very
> much.
karingwood - 19 Dec 2007 19:59 GMT
Thank you for your quick reply. This doesn't seem to work, but it may be
that I need to provide you with a little more detail. The form has several
fields: Select (yes/no field in question), category, question id, question
description.
I tried this 2 ways. I tried using the exact syntax you provided below.
When I reopened the form, the check boxes were still checked.
Then I tried substituting the word 'Checkbox1" with "Select" and received
this error message:
The expression On Close you entered as the event property setting produced
the following error: The object doesn't contain the Automation object "Me.".
Can you tell me what I am doing wrong? Thanks so much!
> In code behind the form, perhaps in the form's Close event:
>
[quoted text clipped - 14 lines]
> > don't reset when the form is exited and then reopened. Thank you very
> > much.
Jeff Boyce - 20 Dec 2007 17:05 GMT
My "syntax" was only an example ... I suppose I should have clarified it as
"untested aircode".
Please copy the code you are using and paste it back here.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Thank you for your quick reply. This doesn't seem to work, but it may be
> that I need to provide you with a little more detail. The form has
[quoted text clipped - 36 lines]
>> > don't reset when the form is exited and then reopened. Thank you very
>> > much.
karingwood - 20 Dec 2007 17:34 GMT
Hi Jeff: Someone else posted a reply that did the trick for me. Thank you.
In case you are interested, I used your code exactly, just replaced
'checkbox1' with my field name. I appreciate your time. Happy holidays.
Kathy
> My "syntax" was only an example ... I suppose I should have clarified it as
> "untested aircode".
[quoted text clipped - 46 lines]
> >> > don't reset when the form is exited and then reopened. Thank you very
> >> > much.
What version of Access?
Is this a listbox, or a continuous forms with a field that is Yes/No. If it
is a continuous form, you will need to write and update query that sets all
of that field to false, and run it in the forms Close event. Something like:
Private Sub Form_Close
currentdb.execute "Update yourTable SET [YourYesNoField] = 0"
end sub
HTH
Dale

Signature
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
> I have set up a form allowing users to select items from a list. After the
> user makes their selections, they run a query that provides them with their
> list. Once this is done, I'd like to have the records deselected (so all
> yes/no check boxes are blank). How do I accomplish this? The check boxes
> don't reset when the form is exited and then reopened. Thank you very much.
karingwood - 20 Dec 2007 17:32 GMT
Dale--That did the trick. Thank you SOOOOooo much. Happy holidays to you.
BTW, I am using Access 2003. I have 2007 but am still irritated by the new
menus so I'm not using it as much as I ought to. Thanks again.
Kathy
> What version of Access?
>
[quoted text clipped - 16 lines]
> > yes/no check boxes are blank). How do I accomplish this? The check boxes
> > don't reset when the form is exited and then reopened. Thank you very much.