Help!!! Please

  • Thread starter Thread starter Simonglencross
  • Start date Start date
S

Simonglencross

I have no idea what I have done but when I try and go in to one of my forms
I get the following message "cant set value to null when checkbox property =
false" any ideas?


Many Thanks

Simon
 
Sounds as if your form is running code on the form's Open event, the form's
Load event, the form's Current event, or a control's Enter event, control's
GotFocus event... and the code is trying to set the value of checkbox
control to Null when the checkbox is bound to a boolean data type field.
 
Ken,


I have looked everywhere and I cant find anything which would cause the
error I understand there must be something but I cant find it anywhere. Have
you any other ideas?


Many Thanks

Simon
 
Do you have a checkbox control on the form? If yes, look at its Data
properties in design view. Is the TripleState property set to Yes? Change it
back to No.
 
I have had a check box on the page but no longer do, but it still continues
to bring up the message , have you any other ideas its driving me mad...


Many Thanks


Simon
 
I still think there is some code running somewhere that is causing this
error.

Can you zip up the database file? If yes, you may email it to me and I'll
take a look. My email address can be obtained by removing this is not real
from my reply address.
 
Ken,

I can email it to you but I'm not aware of your email address, could you
please let me know what it is.


Kind Regards


Simon
 
You'll see my reply email address below ([email protected]).
You need to remove the text this is not real from it. I won't post it here
because spammers will harvest it.
 
I have looked at your database. The error that you're getting is caused by
the DatePicker control. It is bound to the "Sub Renewal date" field in your
RecordSource. In your sample data, only the first record has a value in this
field; the other two records have Null value in this field.

The error occurs when you move from one record to another record. If the
record to which you're moving has a Null value in the field that is bound to
the DatePicker control, the error about the CheckBox property appears
immediately.

The DatePicker is a real nuisance because it won't allow a Null value in the
field to which it's bound. I recommend that you do one of the following two
things to "fix" this error:

(1) Set the CheckBox property of the DatePicker to Yes. This property is
on the Other tab for the control's Properties.
(2) Set a default value for the "Sub Renewal date" field in the table so
that a new record will automatically have a date value when the record is
created.
--

Ken Snell
<MS ACCESS MVP>
 
Back
Top