Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input Date in the TextBox
Message
From
28/06/2001 06:05:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/06/2001 05:47:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00524522
Message ID:
00524575
Views:
11
>Thanks a lot for your prompt reply. Unfortunately, I am still confused.
>Let me explain the problem in details.
>
>I have a textbox in which I want the user to input date. text1.format is "E". By default century is ON. I am not chenging it anywhere. I have not changed form.datasession also. It is also set to default only. text1.controlsource is m_Fr_dt. in form.init I have following statment - STORE {} TO m_Fr_Dt.
>
>The form is open in modify mode. I am trying to test the form. When I run the form for the first time (by clicking on "!" icon) and enter any date in this textbox, the year does not change to 4 digit year. At the same time, if I issue a command - WAIT DTOC(m_Fr_Dt) WINDOW anywhere else in the form, it generates the error - Function argument value, tpe, or count is invalid.
>
>Surprisingly, when I run the form second time, everything works just fine. And I don't know how and why ???

Oh memvar as controlsource. OK still try setting its value property to {}.
Store {} to m_FR_dt
in form.init is goen with the wind. Unlike fox2x style in VFP once a method/event code ends all variables that are not public goes out of scope (I don't mean use public). To preserve variables rather use properties. ie: add a property to form called m_Fr_dt. All form objects can see thisform.m_Fr_dt

PS: You don't need to set controlsource to a memvar. Instead leave it empty and when needed (assuming textbox named myTextbox_FR_Dt) :

something = thisform.myTextbox_FR_dt.value
wait window dtoc(thisform.myTextbox_FR_dt.value)

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform