Making all yes/no boxes true in a field?

dcfi6052

Registered User.
Local time
Today, 00:15
Joined
Jan 25, 2012
Messages
34
I have a DB with over 1000 records and I decided to add a new yes/no field to my main table. So far all the records would be checked to True, but any new records would be set to False.

I don't want to go through all 1000 records checking each box. Is there a way to select all the records in the new field (or only certain ones for future reference) and make them all set to True in one click? Or using VBA?

I have tried setting the default value to "checked" but it will only be true for new records.

Any help would be appreciated.
 
An update query would be simplest:

UPDATE TableName
SET FieldName = True

You can add a WHERE clause to restrict to certain records.
 
Sounds like what I'm looking for...stupid question though...how do I do an update query? where would I type that code in?
 
What I posted is SQL, and could be typed directly into SQL view of a query (changing the names of course). You can also start a select query and convert it to an Update query via the icon on the ribbon or options in the menu pre-2007.
 
I use the context menu to change query type. Right click anywhere in the background of the query in design view and expand query type.

I also change the view, save and close objects with the context menu on their tab.
 
Thank you to pbaldy and galaxiom! that did the trick and saved me a lot of time!
 

Users who are viewing this thread

Back
Top Bottom