Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery ?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01474625
Message ID:
01474645
Views:
33
I guess I don't know how to do this as well as I thought I did. Here's what I have. I am getting weird errors. I thought I created the object for the grid. I called it "oGrid" and yet when I reference it, I get errors saying it doesn't exist. Yet, when I look at the debugger, the oGrid is there.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform