Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2004, 05:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2000 Check Boxes

I am having a problem with check boxes on forms.

If the box is checked, I can un-check it with no problem.

However, if I try to check an un-checked box, I get an error dialog box which says that I am trying to put more data into a field than it can hold and to try to insert less data.

What gives?

Is there a fix?

Rand
__________________
Rand
 
Old March 3rd, 2004, 06:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

We need a little more background about how you created the checkboxes.

For example, if they are part of an option group (where checking one checkbox UNchecks the others automatically), then the checkbox states (assuming triple state property is set to NO) are either TRUE or FALSE. However, the option group value is equal to the checkbox number which you clicked TRUE. Therefore, if you clicked the second checkbox, the option group value is 2, etc.

Could it be you're trying to code something and instead of giving the option group a value of 1, 2, 3, etc. you're trying to assign this number to a checkbox itself?

You get the idea... we need to know more about your form structure and when this error occurs.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old March 3rd, 2004, 06:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's OK! I found the problem.

Somehow, when the data was imported from SQL Server, the boolean fields got converted into single character text fields.

All I had to do was to convert the fields into boolean data type (True/False, Yes/No, On/Off values).

Rand





Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop over check boxes sams ASP.NET 1.0 and 1.1 Professional 5 July 17th, 2007 06:26 AM
Check Boxes Allan320 Access VBA 3 June 2nd, 2006 05:45 AM
Using check boxes to filter dstein4d Access VBA 13 January 25th, 2006 07:50 PM
Beginning Access 2000 VBA Chapter 6: List Boxes greencw BOOK: Beginning Access VBA 1 June 13th, 2004 08:16 PM
Getting value of Dynamic Check boxes kathryne Classic ASP Databases 3 March 19th, 2004 05:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.