Solved

Auto check box

Posted on 2004-10-06
8
312 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
  • 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 49

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 49

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
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now