ActiveX Problem - Date Picker Control

Bill Moore

Registered User.
Local time
Today, 06:58
Joined
Dec 11, 2003
Messages
51
ActiveX problem (still)

I'm still having problems with my ActiveX Date Control. The control is Microsoft Date Picker.

The control is on the form with its ControlSource property set to my field that I want to populate (fbdate).When I select a date I get the following message twice:

When I attempt to select a date I get the following error:

"Can't set value to NULL when CheckBox property = "FALSE". I don't have any check boxes so I don't understand what's happening.

Any ideas?

Thx.
 
Maybe if you post an example this time we'll find out what the problem is.
 
not lazy

No, I'm not too lazy to find my original post. I haven't utilized this forum very long and since I hadn't received any significant replies, I was wondering if I asked a stupid quesiton or what.

No offense intended to anyone. I think the form is great and provides very valuable information. On this particular post, I just hadn't received much information.

If I'm out of line here, I'll find another avenue for some help.

Thx.
 
Example

The DatePicker control is on my form. I have its controlSource property set to the field that will contain the selected date.

When I run the form, one option is for me to select the "new record" navigation button. I then click the control and the Picker displays. I select a desired date, then tab to the other field (amount) on the form. It is at this point that I receive that error message mentioned in my original post.

My source field (fbdate) is defined as date/time data type and it is part of the record key.

That's about all I can give for an example.

Thx.
 
Bill, I honestly haven't use that control, but just checking quickly, the control has it's own Checkbox property. I don't know what it's for, but you can try fiddling with it.
 
Na chill. I actually thought I was out of line and that's why I changed my little response.

I removed the older post which was made less than 24 hours ago. It's just that most people "bump" their question if there's been little or no response to their question rather than completely report it - it means that there would be an empty thread floating about unanswered (and I hate unanswered threads :p ).

As for your question, I tried to recreate and managed to do so. The problem occurs because you have the Date Picker bound to the field and, when you start a new record, the field is blank/Null. It tries to assign the Null value to the Date Picker but fails. It can only do this if the Date Picker's CheckBox property is on (but switched off) - basically an On/Off switch for the control.
 
One more question

I downloaded your control and saw how it worked. My final question is this:

I was trying, somehow, to select a date from the date picker and have that date bound to my date field directly from the control. I assume, from looking at your form, that I will need a separate date field text box on my from and then store the selection from DatePicker into this field.

Is this correct?

I can go forward from here regardless.

Thanks again.
 
This is the first time I've ever looked at the Date/Time Picker Control so I don't know anything about it, but from looking at it, you can bind it directly to the underlying field but, unless your field has a Default Value set at table level or you have that Checkbox option of the Control set, then it would be better to keep the surplus textbox. It is, afterall, one line of code - it's hardly going to cause a speed issue.
 

Users who are viewing this thread

Back
Top Bottom