* Routine: cmdselect.click local lcClass,lcMo,lcDate,lcDay,lcYr store "" to lcClass,lcMo,lcDate,lcDay,lcYr with ThisForm if .grdSignUp.LastRow # 0 if !empty(curEmployees.ccity) and !empty(curEmployees.cbldg) lcDate = allt(curEmployees.classdate) lcClass = allt(curEmployees.classes) lcMo = substr(lcDate,1,at(" ",lcDate)-1) lcDay = substr(lcDate,at(",",lcDate)-2,2) lcYr = right(lcDate,4) * call attended object so filter can be set and reset select attended,classes,ccity,cbldg,croom,cmonths,cdates,cyears ; from signup ; into cursor curAttended ; where classes=lcClass and cmonths=lcMo and cdates=lcDay and cyears=lcYr oAttend = createobj('attended',lcClass,lcMo,lcDay,lcYr,alias()) deactivate window menuscr oAttend.visible=.T. oAttend.show else Messagebox("Please select a valid class to update the Class Attendance",48,"Class has no City or Building association") endif else Messagebox("Please highlight a record to update the Class Attendance",48,"No Class Selected") endif endwith>I created a modal form with a single command button on it and made the command button backcolor an unusual color (so it would stand out). Then I saved the form as a class called 'TestFormClass'
>SET CLASSLIB TO "testformclass.vcx" >frmMyForm = CREATEOBJECT('TestFormClass') && Create a Form from this class >frmMyForm.windowstate = 0 > >frmMyForm.AddObject('shpLine','Line') && Add a Line control to the form >frmMyForm.AddObject('cmdCmndBtn1','commandbutton') && Up Cmnd button > >frmMyForm.shpLine.Visible = .T. && Make Line control visible >frmMyForm.left = 10 >frmMyForm.backcolor = this.backcolor >frmMyForm.Caption = "Test 2nd Form" >frmMyForm.shpLine.Top = 20 && Specify Line control row >frmMyForm.shpLine.Left = 125 && Specify Line control column >frmMyForm.cmdCmndBtn1.caption = "Dummy Button" >frmMyForm.cmdCmndBtn1.Visible =.T. && Up Command button visible > >frmMyform.visible = .T. >frmMyForm.SHOW() && Display the form >>It works for me.