WITH THISFORM .cTable = THISFORM.grdProduction.RECORDSOURCE && Used in Delete and Recall buttons. .txtSearch1.VISIBLE = .F. .txtSearch2.VISIBLE = .F. SET MULTILOCKS ON SELECT (.cTable) && Projects table. LOCATE && Takes you to first record faster than GOTO TOP. * Determine the current shift for the manual entry. .nShift001=ALLTRIM(STR(INT((VAL(LEFT(TIME(),2))-3)/8))) .nShift001=IIF(VAL(.nShift001) < 0, "2", .nShift001) .cDate=DTOC(DATE()) && Init today's date, if needed for a new record. .nSerial=1 && Init the Serial # for Manual entries. *** 04/11/2008 Cecil. We must initialize here, so that we don't cause the *** table to change. .cboPort.ControlSource ="Production.Port" .cboDistrib.ControlSource="Production.Distrib" *** 04/11/2008 Cecil. End. .IsDeleted() .lblModeStatus.CAPTION = "EDIT MODE" && Tells user what mode he is in. .lblDateTime.CAPTION = DTOC(DATETIME()) .txtOperatorName.REFRESH() .txtEmpName.REFRESH() .cntSearch.Width = 186 .CountRecs() ENDWITH