| 上一篇主題 :: 下一篇主題   | 
	
	
	
		| 發表人 | 
		內容 | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 1 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 11:11 am    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				分兩部分作
 
1.Form1.text1.keyress event
 
 
DO FORM Form2
 
THIS.VALUE=Grid1.產品編號
 
 
 
2.Form2的Grid中篩選出產品編號開頭皆為GOxxx或是SIxxx,讓我去選擇
 
然後結束Form2 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 2 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 12:45 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				Grid1 --->資料表 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 3 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 12:47 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				更正
 
分兩部分作 
 
1.Form1.text1.keyress event 
 
 
DO FORM Form2 
 
THIS.VALUE=mGrid1.產品編號 
 
 
 
2.
 
Form2.Grid1.RrecordSource="mGrid1"
 
 
Form2的Grid中篩選出產品編號開頭皆為GOxxx或是SIxxx,讓我去選擇 
 
然後結束Form2 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 4 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 6:24 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				select 产品编号 from cdbfname where atc(cvalue,产品编号)#0 into cursor temp1
 
--->
 
select 产品编号 from cdbfname where 产品编号 like ALLTRIM(cvalue)+"%" 
 
  into cursor temp1 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 5 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 7:20 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				這樣下
 
select 产品编号 from cdbfname where 产品编号==ALLTRIM(cvalue)  into cursor temp1 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		garfield Site Admin
  
  註冊時間: 2003-01-30 文章: 2160
 
  第 6 樓
  | 
		
			
				 發表於: 星期一 七月 28, 2003 10:50 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				看起來在frm2的INIT 有問題
 
form2.init 
 
lpara cvalue
 
 
thisform.addproperty('findvalue')
 
thisform.findvalue = cvalue
 
 
 
this.grid1.recordsourcetype = 4 
 
this.grid1.recordsource = 'select 产品编号 from cdbfname where atc(thisform.findvalue,产品编号)#0 into cursor temp1" _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 7 樓
  | 
		
			
				 發表於: 星期二 七月 29, 2003 11:30 am    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				改成
 
cvalue=ALLTRIM(cvalue)+"%"
 
 
select 产品编号 from cdbfname where 产品编号 like cvalue
 
into cursor temp1 _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 8 樓
  | 
		
			
				 發表於: 星期二 七月 29, 2003 1:13 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				這行不用
 
thisform.text4.refresh _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		 |