Hi Tim,
What do you mean by "doesn't seem to work"? Do you get an error message? Are you sure the variable goodDate really exists?
BTW, here is another way to approach a code based form. This way puts more of the code and the objects of the form within the class definition itself:
oForm = newobject("form1")
oform1.show()
DEFINE CLASS form1 AS form
AutoCenter = .T.
Caption = "Form1"
Name = "Form1"
windowType = 1
ADD OBJECT command1 AS commandbutton WITH ;
Top = 29, ;
Left = 39, ;
Height = 27, ;
Width = 84, ;
Caption = "Command1", ;
Name = "Command1"
PROCEDURE command1.Click
activate screen
? "hello world"
ENDPROC
ENDDEFINE
>
>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
Steve Gibson