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:
01474652
Views:
29
I do have the SAFE SELECT working and although removing the grid and reinstantiating it might be overkill, as Tamar stated (and it surely is), I still want to do it just to see if I can get it working that way too.

Here's what I have right now with the SAFE SELECT that Naomi and Tamar suggested, and Andy Kramek wrote up on this link:
http://weblogs.foxite.com/andykramek/archive/2005/03/19/174.aspx

For the below, I picked up the QuoteID from the Column1.Text1.Value and the other columns as well and passed it to the Destroy event where I then selected the original base table, "Quotes", and did a LOCATE for Quotes.QuoteID = ThisForm.QuoteID. This seems to work quite well actually. It is a little weird, but works very cleanly.
SET NEAR ON
WITH ThisForm
	DO CASE
		CASE .cboOrder.ListIndex = 2	&& Part Number (CustPartNo)
			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\tmpQuotes2
			
			SELECT tmpQuotes
			ZAP IN ("tmpQuotes")
			APPEND FROM C:\Dev\CMW\Data\tmpQuotes2
			
			LOCATE
	ENDCASE
	.grdFindQuote.Refresh()
	.grdFindQuote.SetFocus()
ENDWITH
.
Previous
Reply
Map
View

Click here to load this message in the networking platform