Re: DateTime Picker

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: 12/03/04


Date: Thu, 2 Dec 2004 21:48:11 -0700

Be aware that you can't use an EMPTY() or NULL date field value because I
don't think those are valid values for that control.

You might need to bind to a form property that you change according to the
field value. Substitute today's date or some other constant date when the
date field is NULL or EMPTY(), or less than the MinDate property.

Also be sure to set the MinDate and MaxDate properties. You can use Jan 1,
1601 (1/1/1601) for the MinDate, and December 31, 9999 (12/31/9999) for the
MaxDate.

-- 
Fred
Microsoft Visual FoxPro MVP
"Hutch Elassaad" <helassaad@comcast.net> wrote in message 
news:Zf2dnY3mrrqZSTLcRVn-qg@comcast.com...
> Fred, I am going with a vanilla code here.  I have a form where I drop the
> datetime picker and the control soucrce points to a field in the table
> defined as type datetime.  When I edit the record and try to change the
> time, it doesn't work.  It reverts back to whatever was saved before. 
> Also
> if there was an invalid date in the field in the table, I get some sort of
> an error.  I allowed for null values for that field in the table.
>
> -- 
>
>
> ---------------------------------------------------------------------
> "Are you still wasting your time with spam?...
> There is a solution!"
>
> Protected by GIANT Company's Spam Inspector
> The most powerful anti-spam software available.
> http://mail.spaminspector.com
>
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:uUbMdqN2EHA.3468@TK2MSFTNGP14.phx.gbl...
>> What problem are you having?   You might just need to add the key phrase
>> "object" to your references to get at some of the properties:
>>
>> thisform.oDTPicker.Object.Value
>>
>> -- 
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
>> news:bpadnebPme4JIjLcRVn-vg@comcast.com...
>> > Anyone knows of a replacement of the Datetime Picker?
>> > I've had nothing but bad luck in trying to make it work.  I remember
> many
>> > of
>> > the conversations that dealt with this before, but I can't get it to
> work
>> > right.  Does anyone have any clear instructions? or a replacement 
>> > object
>> > to
>> > use?
>> >
>> > Thank you,
>> >
>> > Hutch
>> >
>> > -- 
>> >
>> >
>> > ---------------------------------------------------------------------
>> > "Are you still wasting your time with spam?...
>> > There is a solution!"
>> >
>> > Protected by GIANT Company's Spam Inspector
>> > The most powerful anti-spam software available.
>> > http://mail.spaminspector.com
>> >
>> >
>> >
>>
>>
>
> 


Relevant Pages

  • Re: DateTime Picker
    ... The DateTimePicker has no concept of empty dates. ... datetime really) or it's NULL. ... You have to catch the state of the control in the Change event and update ... > Also be sure to set the MinDate and MaxDate properties. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: SetFocus doesnt work if recordset is empty?
    ... Another workaround is to set the form's RecordSource property to an empty ... string (assumes that the form has code to reassign the correct RecordSource ... > If you control you are trying to refer to is in the Form Header or Form ...
    (microsoft.public.access.formscoding)
  • Re: Re-post: Yet another problem with "no current record"
    ... It is the case that my detail area is ... move focus to another control if there are no records. ... There is a case where Access 2002 SP3 generates this error message afer a ... I set "No Additions" to True in my code, so no empty row shows ...
    (microsoft.public.access.formscoding)
  • Re: Deletion of Empty Page in the Word Document through VBA
    ... > pictures, etc) into a single, final word document. ... the .rtf file is formed from the html file. ... > is in the 'last but one' row of a table and sometimes if the control ... > scan each and every page and finding if any empty page is there. ...
    (microsoft.public.word.numbering)
  • Re: DataBinding change notification problem...
    ... trying to programmatically modify the value of the datetime picker and have ... > I have a DateTime picker control on a form. ... > DataRow immediately. ...
    (microsoft.public.dotnet.languages.csharp)