Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01474625
Message ID:
01474645
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform