Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access VBA solution required 1

Status
Not open for further replies.

leijen

Technical User
Mar 15, 2003
7
0
0
NZ
Hi all
This is my wish

I press a button and this runs a query to filter a yes/no field and the result I want shows ticked fields (1) not (0)
I then want to change all the records within that field to (0) or unticked.
This is a little beyond me.
Thanks in advance.
Sam
 
this should do it. Change the table and field names. You indicated a Yes/No field but you indicated a 1 or 0. Actually a Yes/True tick is considered -1. Thus the change in the code:

UPDATE tblYourTable SET tblYourTable.YesNoField = 0
WHERE (((tblYourTable.YesNoField)= True));


Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top