Solved

Auto check box

Posted on 2004-10-06
8
321 Views
Last Modified: 2008-02-07
How can I check all of the check boxes in a field  at one time?  I forgot to check them as the records were entered and now have several hundred in one field that needs to be checked.  Thanks
0
Comment
Question by:zubin6220
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 28

Expert Comment

by:burrcm
ID: 12235172
If your table has less than 65,000 records, just copy and paste to Excel, change the No's to Yes's. Delete the records from the table, compact, then paste them back. Fixed.

Chris B
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 80 total points
ID: 12235236
In your access query, try update the field like:

Update mytable Set myCheckBox = True

then execute it, as guess your checkbox is actually a boolean field.

Hope this helps
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12235497
If there is a lot of new records will be added to your table, you can try to set the field's Properties, Default Property to:

=True

so that by default a record is inserted, that column will filled with true value (checkbox is checked)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:zubin6220
ID: 12236258
ryancys.  I tried query with field selected that had check box and entered Update mytable Set myCheckBox = True in criteria but did not work.  I must be entering this wrong.  Maybe I'm not setting up the Query correctly.  Please advise.  
0
 
LVL 2

Expert Comment

by:aabbas
ID: 12236405
You can also accomplish your requirement by just doing the following steps.

Do all these steps in the table's design view.

1. Delete the check-box column (field) from the table.
2. Add a check-box column (field) with same name (you might have used it in forms etc).
3. Type TRUE in DEFAULT property of the newly added field (I assume the field type is Yes/No. If it's TEXT and you are using Y or N, put "Y" in DEFAULT property).

Save the table and see if it works... It should.

Best of luck.
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12236436
Design a new query. Add your table. Click Query->Append Query.

Add your field. In the "Update To" line, put "True". Run your query and this will update the data in your table (this is a manual way to achieve what ryancys' SQL does).
0
 
LVL 2

Assisted Solution

by:aabbas
aabbas earned 20 total points
ID: 12236458
No it didn't work. I thought, it might work like it does in Oracle. This is why DEFAULT VALUE clause is. Anyway...

Then you will need to code the UPDATE query as suggested by ryancys. Assuming, your table name is MYTABLE and checkbox field name is MYCHECKBOX, and MYCHECKBOX is of type YES/NO, create a new query and type the following in SQL view.

update MYTABLE set MYCHECKBOX = true;

Save the query and run it. This will update the chechbox in all the existing records.

It works like Oracle does.. I have tested. :)
0
 

Author Comment

by:zubin6220
ID: 12237816
Thanks once again for the help.  
I split the points because aabbas made it somewhat clearer to this Access neophyte.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

731 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question