>Timothy,
>
>You could do it within the init() method of the textbox, or you could do it from outside of the textBox:
>
>
frmMyForm.AddObject('text1','myTextBox')
>goodDate = date()
>
>
>frmMyForm.text1.value = goodDate
>
>>
>>YES, that example helped alot, got me on track. 1 quest I have though is that I substituted a textbox for the cmdbuttons in the example and I want the textbox to start off with a value taken from a .mem var. Where do I put my "restore from l:gooddate.mem addit" statement to make it work? Right now it's telling me "GOODDATE" is not found.
>>
>>
That doesn't seem to work given the way this is designed let me include what I have(if not too long)
pForm=CREATEOBJECT("Form")
pForm.WindowType=1 && set modal to avoid using READ EVENTS for demo
pForm.Autocenter=.T.
pForm.Caption="Enter this month's (25th) Cc Date for techs to post"
pForm.Addobject("mtb","tbtextbox")
pForm.Addobject("mlab","tblabel")
rest from l:gooddate.mem addit
pForm.Width=550
pForm.Height=250
* pForm.mtb.value= gooddate
pform.show
pform.mtb.value=gooddate
DEFINE CLASS tbtextbox as textbox
Left = 10 && Command button column
Top = 20 && Command button row
Height = 45 && Command button height
Width=85
fontsize=16
forecolor=128
Visible=.t.
ENDDEFINE
PROCEDURE Click
* rest from l:gooddate.mem addit
* ThisForm.shpLine.Visible = .F. && Hide the Line control
* ThisForm.shpLine.LineSlant ='/' && Slant up
* ThisForm.shpLine.Visible = .T. && Show the Line control
ENDDEFINE
DEFINE CLASS tblabel as label
Width=550
Height=250
Top=80
Left=20
Width=450
caption="Enter Julian date (25th)"
height=25
fontsize=16
forecolor=128
Visible=.t.
ENDdefine
PROCEDURE Click
CLEAR EVENTS && Stop event processing, close Form
ENDDEFINE
rest from l:gooddate.mem addit
wait
*release thisform
*retu
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."