Subject Re: Forms Processing Text Box buffer to Data Fields
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 13 Sep 2014 22:12:32 +0200
Newsgroups dbase.getting-started
Attachment(s) Unnamed File 1Unnamed File 2Unnamed File 3Unnamed File 4date_format.jpg
Unnamed File 6Unnamed File 7Unnamed File 8





On Sat, 13 Sep 2014 18:04:52 +0200, Ivar B. Jessen <nospam@nospam.com>
wrote:

>> Instead of setting the picture and function properties it is better, in
>> the constructor code, to set the entryfield's value property to { }  
>> (curly
>> brackets) which is an empty date.  This will allow the entry of a date  
>> in
>> the appropriate format.  Even this has it's problems though. <g>  This
>> value cannot be set by using the Inspector so it must be done from  
>> within
>> the sourcecode editor.  The next time the form is opened in the form
>> designer the form designer will stream out {    /  /  } or {  /  /    }
>> depending on the date format set for the computer which takes one back  
>> to
>> square one.
>
>
> Hmm, I can set the value by using the Designer Inspector and the value  
> does not change when the form is reopened :-)

Mm, I'm afraid my original post wasn't quite clear.  When I said "This
value cannot be set by using the Inspector" I meant a value of {} rather
than the value property of the entryfield.  It does, however, turn out I
was indulging in my favourite exercise - jumping to conclusions. <g>  It
turns out that setting the value property to {} is quite unnecessary and
all I've succeeded in doing is confusing Robert.  Sorry, Robert. <blush>

I've since done a bit of digging (better late than never <g>) and I find
that by selecting the Date option from the Type button's dropdown list the
designer sets the value property to the date format set for the computer
ie {  -  -    } for your computer and {   /  /  } for mine.  I assumed
that the format in the constructor code would be used when the form was
opened.  A simple test shows this isn't so.  dBASE presents the
appropriate skeleton for the date format on the computer running the code.

Mervyn.