By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,480 Members | 763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,480 IT Pros & Developers. It's quick & easy.

Deselect all checkboxes by one query

P: n/a
Hi: In my table there is a field of type checkbox. I create a button on
my form and wants to deselect all the checkboxes in that field
(PrintQueue).

Table: Research_New
PrintQueue Format Yes/No

Thanks for help.

Aug 15 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
(air code)
UPDATE Research_New Set PrintQueue = 0
Fred Zuckerman

<co*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi: In my table there is a field of type checkbox. I create a button on
my form and wants to deselect all the checkboxes in that field
(PrintQueue).

Table: Research_New
PrintQueue Format Yes/No

Thanks for help.

Aug 15 '06 #2

P: n/a
It gives error:
Invalid operation
-------------------------------------
UPDATE Research_New Set PrintQueue = 0
Table: Research_New
PrintQueue Data Type: Yes/No
--------------------------------------------------
Fred Zuckerman wrote:
(air code)
UPDATE Research_New Set PrintQueue = 0
Fred Zuckerman

<co*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi: In my table there is a field of type checkbox. I create a button on
my form and wants to deselect all the checkboxes in that field
(PrintQueue).

Table: Research_New
PrintQueue Format Yes/No

Thanks for help.
Aug 15 '06 #3

P: n/a
It works for me on a test.
Are you sure of your table name, field name, and data type?
Are you running the statement from code in a form event or are you pasting
directly into a query.
If you're running from code, then what is your statement (exactly)? And
which event?

Code should be something like:
DoCmd.RunSQL "UPDATE Research_New Set PrintQueue = 0"

Fred Zuckerman
<co*********@gmail.comwrote in message
news:11*********************@74g2000cwt.googlegrou ps.com...
It gives error:
Invalid operation
-------------------------------------
UPDATE Research_New Set PrintQueue = 0
Table: Research_New
PrintQueue Data Type: Yes/No
--------------------------------------------------
Fred Zuckerman wrote:
(air code)
UPDATE Research_New Set PrintQueue = 0
Fred Zuckerman

<co*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi: In my table there is a field of type checkbox. I create a button
on
my form and wants to deselect all the checkboxes in that field
(PrintQueue).
>
Table: Research_New
PrintQueue Format Yes/No
>
Thanks for help.
>

Aug 15 '06 #4

P: n/a
Can any one please tell me the steps that how to run an update query on
the table

Thank You.

Aug 16 '06 #5

P: n/a
co*********@gmail.com wrote:
Can any one please tell me the steps that how to run an update query
on the table

Thank You.
Where? From Code? Manually via the GUI?

To run an update query manually you create a new query, add your table, set
the query type in the menu to UPDATE and then configure the changes you want
to make to the desired columns and then presss the exclamation point button
in the toolbar. If you save an UPDATE query then it can be run simply by
opening it from the db window.

From code you can run a saved UPDATE query with...

DoCmd OpenQuery "QueryName"

or (preferred)

CurrentDB.Execute "QueryName", dbFailOnError

You can also use...

DoCmd.RunSQL "UPDATE SQL Statement"

or

CurrentDB.Execute "UPDATE SQL Statement", dbFailOnError

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Aug 16 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.