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

Re: DateTime Picker by Fred

Fred
Thu Dec 02 19:51:30 CST 2004

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
>
>
>



Re: DateTime Picker by Hutch

Hutch
Thu Dec 02 20:48:35 CST 2004

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
> >
> >
> >
>
>



Re: DateTime Picker by Fred

Fred
Thu Dec 02 22:48:11 CST 2004

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
>> >
>> >
>> >
>>
>>
>
>



Re: DateTime Picker by Anders

Anders
Fri Dec 03 09:42:25 CST 2004

NULL datetimes are ok with the DTP control.,
The DateTimePicker has no concept of empty dates. A date is a date (or
datetime really) or it's NULL.
You have to catch the state of the control in the Change event and update
your data table in code there. It will follow the ControlSource but
preferably you should not allow empty dates but set unknown dates to NULL as
default. As you know, SQL RDBMS databases like MS SQL Server and Oracle
don't support 'empty' dates either.
Function Change
IF ISNULL(THIS.OBJECT.VALUE)
REPLACE dates.dt WITH NULL
ELSE
REPLACE dates.DT WITH THIS.OBJECT.VALUE
* thisform.text1.value=WEEK(this.object.value,2,2)
ENDIF


-Anders

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> 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
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
>
>


Re: DateTime Picker by Hutch

Hutch
Sat Dec 04 11:00:10 CST 2004

Fred,

What did you mean by binding to a form property. I never used binding and
may be it is the right time to start understanding it and using it.
The help file didn't explain much to me, but I am getting the "What's new in
visual foxpro 8".

thanks

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


"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> 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
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: DateTime Picker by Fred

Fred
Sat Dec 04 15:52:16 CST 2004

Anders covered the topic pretty well. Binding is merely associating the
ControlSuurce of the control with a field in a table/cursor/view or a
variable/property. In most cases, you would use a field, but since dates in
SQL have this difference from VFP of not allowing an EMPTY date, you need to
associate the ControlSource with a form property (a variable would go out of
scope unless you used a PUBLIC variable, which is not something you should
do). The problem then exists that you have to manually shuttle the value of
the property back and forth to the table, as Anders has shown.

--
Fred
Microsoft Visual FoxPro MVP


"Hutch Elassaad" <helassaad@comcast.net> wrote in message
news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
> Fred,
>
> What did you mean by binding to a form property. I never used binding and
> may be it is the right time to start understanding it and using it.
> The help file didn't explain much to me, but I am getting the "What's new
> in
> visual foxpro 8".
>
> thanks
>
> 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
>
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
>> 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
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: DateTime Picker by Hutch

Hutch
Sun Dec 05 11:38:09 CST 2004

Fred,

I didn't quite understand Anders example. Although he had tried helping me
on several occassions before. (My hat goes off to him for supporting this
NG)
Can you please do me a favor and
send me an example. Nothing really major. Just a table that has a date in
it and a form with the default buttonset (default text navigation buttons at
the bottom of the form) and show me how when I add or edit a record I can
use the datetime picker on the form with the binging that you mentioned. I
may be thinking too much into it.

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


"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:uIhUFuk2EHA.1192@tk2msftngp13.phx.gbl...
> Anders covered the topic pretty well. Binding is merely associating the
> ControlSuurce of the control with a field in a table/cursor/view or a
> variable/property. In most cases, you would use a field, but since dates
in
> SQL have this difference from VFP of not allowing an EMPTY date, you need
to
> associate the ControlSource with a form property (a variable would go out
of
> scope unless you used a PUBLIC variable, which is not something you should
> do). The problem then exists that you have to manually shuttle the value
of
> the property back and forth to the table, as Anders has shown.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
> > Fred,
> >
> > What did you mean by binding to a form property. I never used binding
and
> > may be it is the right time to start understanding it and using it.
> > The help file didn't explain much to me, but I am getting the "What's
new
> > in
> > visual foxpro 8".
> >
> > thanks
> >
> > 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
> >
> >
> > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> >> 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
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: DateTime Picker by Anders

Anders
Sun Dec 05 17:30:11 CST 2004

Hi Hutch
The only code I think you need are the few lines of code in my previous
message. Put them in the DatetimePicker's Change event.
Does this help?
Anders

"Hutch Elassaad" <helassaad@comcast.net> wrote in message
news:j5WdnZlhzfYc2i7cRVn-rw@comcast.com...
> Fred,
>
> I didn't quite understand Anders example. Although he had tried helping
me
> on several occassions before. (My hat goes off to him for supporting this
> NG)
> Can you please do me a favor and
> send me an example. Nothing really major. Just a table that has a date
in
> it and a form with the default buttonset (default text navigation buttons
at
> the bottom of the form) and show me how when I add or edit a record I can
> use the datetime picker on the form with the binging that you mentioned.
I
> may be thinking too much into it.
>
> 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
>
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:uIhUFuk2EHA.1192@tk2msftngp13.phx.gbl...
> > Anders covered the topic pretty well. Binding is merely associating the
> > ControlSuurce of the control with a field in a table/cursor/view or a
> > variable/property. In most cases, you would use a field, but since
dates
> in
> > SQL have this difference from VFP of not allowing an EMPTY date, you
need
> to
> > associate the ControlSource with a form property (a variable would go
out
> of
> > scope unless you used a PUBLIC variable, which is not something you
should
> > do). The problem then exists that you have to manually shuttle the
value
> of
> > the property back and forth to the table, as Anders has shown.
> >
> > --
> > Fred
> > Microsoft Visual FoxPro MVP
> >
> >
> > "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> > news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
> > > Fred,
> > >
> > > What did you mean by binding to a form property. I never used binding
> and
> > > may be it is the right time to start understanding it and using it.
> > > The help file didn't explain much to me, but I am getting the "What's
> new
> > > in
> > > visual foxpro 8".
> > >
> > > thanks
> > >
> > > 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
> > >
> > >
> > > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > > news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> > >> 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
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>


Re: DateTime Picker by Hutch

Hutch
Sun Dec 05 22:49:31 CST 2004

Anders,
Here is your code:
IF ISNULL(THIS.OBJECT.VALUE)
REPLACE dates.dt WITH NULL
ELSE
REPLACE dates.DT WITH THIS.OBJECT.VALUE
* thisform.text1.value=WEEK(this.object.value,2,2)
ENDIF

what does dates.dt mean? and does the change event for the object fire when
you manually change the value or when the value changes based on the field
set as a control source for the object?

Thanks

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


"Anders Altberg" <x_pragma@telia.com> wrote in message
news:uIQDiJy2EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hi Hutch
> The only code I think you need are the few lines of code in my previous
> message. Put them in the DatetimePicker's Change event.
> Does this help?
> Anders
>
> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> news:j5WdnZlhzfYc2i7cRVn-rw@comcast.com...
> > Fred,
> >
> > I didn't quite understand Anders example. Although he had tried helping
> me
> > on several occassions before. (My hat goes off to him for supporting
this
> > NG)
> > Can you please do me a favor and
> > send me an example. Nothing really major. Just a table that has a date
> in
> > it and a form with the default buttonset (default text navigation
buttons
> at
> > the bottom of the form) and show me how when I add or edit a record I
can
> > use the datetime picker on the form with the binging that you mentioned.
> I
> > may be thinking too much into it.
> >
> > 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
> >
> >
> > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > news:uIhUFuk2EHA.1192@tk2msftngp13.phx.gbl...
> > > Anders covered the topic pretty well. Binding is merely associating
the
> > > ControlSuurce of the control with a field in a table/cursor/view or a
> > > variable/property. In most cases, you would use a field, but since
> dates
> > in
> > > SQL have this difference from VFP of not allowing an EMPTY date, you
> need
> > to
> > > associate the ControlSource with a form property (a variable would go
> out
> > of
> > > scope unless you used a PUBLIC variable, which is not something you
> should
> > > do). The problem then exists that you have to manually shuttle the
> value
> > of
> > > the property back and forth to the table, as Anders has shown.
> > >
> > > --
> > > Fred
> > > Microsoft Visual FoxPro MVP
> > >
> > >
> > > "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> > > news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
> > > > Fred,
> > > >
> > > > What did you mean by binding to a form property. I never used
binding
> > and
> > > > may be it is the right time to start understanding it and using it.
> > > > The help file didn't explain much to me, but I am getting the
"What's
> > new
> > > > in
> > > > visual foxpro 8".
> > > >
> > > > thanks
> > > >
> > > > 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
> > > >
> > > >
> > > > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > > > news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> > > >> 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
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> >
> >
>



Re: DateTime Picker by Fred

Fred
Mon Dec 06 00:10:57 CST 2004

Posting sample forms is a bit difficult.

All you really need is to have a form property as the ControlSource, and in
the DTPicker.Change, you'd handle the updating the property and or your
table's value. You'd need code elsewhere that would handle moving the data
from the table field to the form property, keeping it within limits you've
set on the DTPicker and also handling NULL or EMPTY() date values. The
DTPicker can only have real date values that are between the MinDate and the
MaxDate of the DTPicker, so you'd have to insure that the form property
never falls outside those limits (or else you'll see an error). When you
update the property on the form, you'd also need to refresh the control.

Say your form property is named "DTPickerValue" and you have a table named
DLIST with a date field named "d1":

DTPicker.ControlSource = "thisform.DtPickerValue" && leave the quotes
off if entering in the property sheet

DTPicker.Refresh:
LOCAL cCS
cCS = this.ControlSource
&cCS = IIF(EMPTY(dlist.d1) OR ISNULL(dlist.d1) OR NOT
BETWEEN(dlist.d1,this.MinDate,this.MaxDate),TTOD(this.MinDate),dlist.d1)

DTPicker.Change:
LOCAL cCS
cCS = this.ControlSource
&cCS = TTOD(this.Object.Value)
REPLACE d1 WITH &cCS IN dlist


Just be sure the intial value of your property fits the MinDate/MaxDate
range or the property will become unbound from the control.
--
Fred
Microsoft Visual FoxPro MVP


"Hutch Elassaad" <helassaad@comcast.net> wrote in message
news:j5WdnZlhzfYc2i7cRVn-rw@comcast.com...
> Fred,
>
> I didn't quite understand Anders example. Although he had tried helping
> me
> on several occassions before. (My hat goes off to him for supporting this
> NG)
> Can you please do me a favor and
> send me an example. Nothing really major. Just a table that has a date
> in
> it and a form with the default buttonset (default text navigation buttons
> at
> the bottom of the form) and show me how when I add or edit a record I can
> use the datetime picker on the form with the binging that you mentioned.
> I
> may be thinking too much into it.
>
> 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
>
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:uIhUFuk2EHA.1192@tk2msftngp13.phx.gbl...
>> Anders covered the topic pretty well. Binding is merely associating the
>> ControlSuurce of the control with a field in a table/cursor/view or a
>> variable/property. In most cases, you would use a field, but since dates
> in
>> SQL have this difference from VFP of not allowing an EMPTY date, you need
> to
>> associate the ControlSource with a form property (a variable would go out
> of
>> scope unless you used a PUBLIC variable, which is not something you
>> should
>> do). The problem then exists that you have to manually shuttle the value
> of
>> the property back and forth to the table, as Anders has shown.
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
>> news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
>> > Fred,
>> >
>> > What did you mean by binding to a form property. I never used binding
> and
>> > may be it is the right time to start understanding it and using it.
>> > The help file didn't explain much to me, but I am getting the "What's
> new
>> > in
>> > visual foxpro 8".
>> >
>> > thanks
>> >
>> > 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
>> >
>> >
>> > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
>> > news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
>> >> 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
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: DateTime Picker by Anders

Anders
Mon Dec 06 09:18:19 CST 2004

The REPLACE command indicates that 'Dates' is a table with field called
'dt'. I should have put
REPLACE <yourtable.yourdatetimecolumn> WITH THIS.OBJECT.VALUE
Sorry about that.
The Change event is triggered when the user has finished entering a value in
the DateTimePicker's textbox.

-Anders


"Hutch Elassaad" <helassaad@comcast.net> wrote in message
news:Y7qdnSYXzZ5GeS7cRVn-2A@comcast.com...
> Anders,
> Here is your code:
> IF ISNULL(THIS.OBJECT.VALUE)
> REPLACE dates.dt WITH NULL
> ELSE
> REPLACE dates.DT WITH THIS.OBJECT.VALUE
> * thisform.text1.value=WEEK(this.object.value,2,2)
> ENDIF
>
> what does dates.dt mean? and does the change event for the object fire
when
> you manually change the value or when the value changes based on the field
> set as a control source for the object?
>
> Thanks
>
> 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
>
>
> "Anders Altberg" <x_pragma@telia.com> wrote in message
> news:uIQDiJy2EHA.2012@TK2MSFTNGP15.phx.gbl...
> > Hi Hutch
> > The only code I think you need are the few lines of code in my previous
> > message. Put them in the DatetimePicker's Change event.
> > Does this help?
> > Anders
> >
> > "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> > news:j5WdnZlhzfYc2i7cRVn-rw@comcast.com...
> > > Fred,
> > >
> > > I didn't quite understand Anders example. Although he had tried
helping
> > me
> > > on several occassions before. (My hat goes off to him for supporting
> this
> > > NG)
> > > Can you please do me a favor and
> > > send me an example. Nothing really major. Just a table that has a
date
> > in
> > > it and a form with the default buttonset (default text navigation
> buttons
> > at
> > > the bottom of the form) and show me how when I add or edit a record I
> can
> > > use the datetime picker on the form with the binging that you
mentioned.
> > I
> > > may be thinking too much into it.
> > >
> > > 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
> > >
> > >
> > > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > > news:uIhUFuk2EHA.1192@tk2msftngp13.phx.gbl...
> > > > Anders covered the topic pretty well. Binding is merely associating
> the
> > > > ControlSuurce of the control with a field in a table/cursor/view or
a
> > > > variable/property. In most cases, you would use a field, but since
> > dates
> > > in
> > > > SQL have this difference from VFP of not allowing an EMPTY date, you
> > need
> > > to
> > > > associate the ControlSource with a form property (a variable would
go
> > out
> > > of
> > > > scope unless you used a PUBLIC variable, which is not something you
> > should
> > > > do). The problem then exists that you have to manually shuttle the
> > value
> > > of
> > > > the property back and forth to the table, as Anders has shown.
> > > >
> > > > --
> > > > Fred
> > > > Microsoft Visual FoxPro MVP
> > > >
> > > >
> > > > "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> > > > news:36ydnd1LI4aHcCzcRVn-rQ@comcast.com...
> > > > > Fred,
> > > > >
> > > > > What did you mean by binding to a form property. I never used
> binding
> > > and
> > > > > may be it is the right time to start understanding it and using
it.
> > > > > The help file didn't explain much to me, but I am getting the
> "What's
> > > new
> > > > > in
> > > > > visual foxpro 8".
> > > > >
> > > > > thanks
> > > > >
> > > > > 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
> > > > >
> > > > >
> > > > > "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> > > > > news:uXgIMNP2EHA.204@TK2MSFTNGP10.phx.gbl...
> > > > >> 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
> > > > >> >&g