>SET NEAR ON >SET CLASSLIB TO "cmw_classes.vcx" >WITH ThisForm > DO CASE > CASE .cboOrder.ListIndex = 2 && Part Number (CustPartNo) > *.grdFindQuote.RecordSource = "" > * Get rid of the current grid and instatiate the grid class > * ghrdSearchQuotes. > SET STEP ON > ThisForm.grdfindQuote.RemoveObject("grdFindQuote") > > SELECT ; > RECNO() AS Rec_No, ; > QuoteID, ; > CustPartNo, ; > Proj_Name, ; > Cust_Name, ; > dQuote, ; > Material1 ; > FROM Quotes ; > WHERE UPPER(Quotes.CustPartNo) = ALLTRIM(UPPER(.txtSearchBy.Value)) ; > INTO TABLE C:\Dev\CMW\Data\tmpQuotes > > oGrid = CREATEOBJECT("grdSearchQuotes") > > SELECT tmpQuotes > LOCATE > .oGrid.RecordSource = "tmpQuotes" > .oGrid.Refresh() > .oGrid.SetFocus() > ENDCASE > *.grdFindQuote.Refresh() >ENDWITH >