Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help for getting data from modal form
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Help for getting data from modal form
Miscellaneous
Thread ID:
00889910
Message ID:
00889910
Views:
56
Hi All,
i have stock actions form its uses two table stockh (parent) stockd(child)
child table on the grid .i am using below codes for detect stockid and assign some info to the grid other columns. it runs well also keypress but select stockid doesnt assing to the requiered column why ?
normally when i reset to default key press makes own job ? its strange how is your comments and suggestion about this matter.
TIA
* gotfocus

This.BackColor= 8454143
this.SpecialEffect =0
this.tag=this.value

*lostfocus

This.BackColor= 16777215
This.SpecialEffect = 2

Set Exact On

If Seek(Trim(This.Value),'stock','stockid')

Thisform.grid1.column3.text1.Value = stock.stockname
Thisform.grid1.column4.text1.Value = stock.unit

Select (Min(price)+Max(price))/2 As AvgPrice From stockd ;
WHERE stockd.stockid=this.value Into Array ArrPrice
Thisform.grid1.column9.text1.Value = ArrPrice
Thisform.grid1.column9.Refresh

Store Thisform.txtDepotid.Value To xdepot
lcfor="stockd.stockid=this.value and stockd.depotid=xdepot"
Calculate Sum (stockd.entryamount) To entries For &lcfor
Calculate Sum (stockd.outgoings) To outs For &lcfor
Thisform.txtstockmev.Value= entries - outs
Thisform.txtstockmev.Refresh

Endif 



If ! Seek(Trim(This.Value),'stok','skodu') Or Empty(This.Value)
Messagebox("Stock ID not found...",16," HATA",3)
This.Value =This.Tag
This.Refresh
This.SetFocus
Endif


* keypress event
Lparameters nKeyCode, nShiftAltCtrl

If nKeyCode = 134 &&f12
Do Form Form\stockfind
IF ! Lastkey()=27
This.value = stock.stockid
Thisform.grid1.column3.text1.Value = stock.stockname
Thisform.grid1.column4.text1.Value = stock.unit
this.SetFocus 
this.Refresh 
Endif
Endif
Reply
Map
View

Click here to load this message in the networking platform