Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Joseph G. Njoroge
  Where is Joseph G. Njoroge?
 Nairobi
 Kenya
 Joseph G. Njoroge
 Tags
Subject: RE: How to store values in DTpicker control
Thread ID: 228339 Message ID: 228371 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Active X Controls & OLE Automation
Date: Monday, May 18, 2009 4:49:58 PM         
   


> >
> > You can't use dates outside datetimepicker's minDate and maxDate ranges. They are by default:
> > 1/1/1601 and 12/31/9999
> >
> > If you have empty dates then they fall outside range (minimum is 1/1/1601). Be sure you don't have empty dates (instead set your field to accept NULL and empty dates to NULL).
> >
> > Cetin Basoz
> >
> > .Net has got better.Think about moving - check my blog:
> > Blog (main)
> > Blog (mirror)
>
> Cetin,
> If the date field has a null value, the system returns this error message. OLE IDispatch execption code 0 from DTPicker: Invalid property value. Unbinding object dcal2.....
> Please let me know where am going wrong.
>
> Thanks
>
> Joseph

DTPicker has a property named checkbox. You need to set it to .T. to accept nulls. Otherwise be sure you don't have a NULL value and the value is between minDate-maxDate. Here is some partial code from my DtControl class (handles Datetime via DTPicker):

* DtControl.Value_Assign
*...
		If .Object.Checkbox
			.Object.Value = Nvl(m.ltTime,.Null.)
		Else
			If !Isnull(m.ltTime)
				.Object.Value = m.ltTime
			Endif
		Endif
*...


Cetin Basoz

.Net has got better.Think about moving - check my blog:
Blog (main)
Blog (mirror)

ENTIRE THREAD

How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 11:24:35 AM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 11:39:00 AM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 12:03:25 PM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 12:07:04 PM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 2:15:46 PM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 4:49:58 PM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/19/2009 7:13:12 AM
RE: How to store values in DTpicker control Posted by Ammar Hadi @ 5/18/2009 1:38:38 PM