thisform.pageframe1.page3.grid1.DeleteMark= .F. thisform.pageframe1.page3.grid1.RecordMark= .F. thisform.pageframe1.page3.grid1.RowHeight=30 thisform.pageframe1.page3.grid1.column1.Width=100 thisform.pageframe1.page3.grid1.column2.Width=375 thisform.pageframe1.page3.grid1.column3.Width=75below code in grid1.column1.text1.valid
Select PARTYCD PARTYCDREC=Recno() varea=.T. luretval=Alltrim(This.Text) If (!Seek(PARTYCD.compcode,'tcust','accode') And !Empty(PARTYCD.compcode)) Or Lastkey()=-1 aabb=Alltrim(This.Text) Do comphelp With PARTYCD.compcode Wait Window Timeout .01 If Not Empty(luretval) Sele PARTYCD If Seek(luretval,"tcust","accode") Select PARTYCD Goto PARTYCDREC Replace PARTYCD.compcode With tcust.accode, PARTYCD.compname With tcust.acname Endif Endif Endif Select PARTYCD Goto PARTYCDREC If Empty(PARTYCD.compcode) Return Endif If Seek(PARTYCD.compcode,'tcust','accode') Replace PARTYCD.compname With tcust.acname Else varea=.F. Endif Select PARTYCD Goto PARTYCDREC Return vareabelow code in when event of grid1.column2.text.when
RETURN .F.
below code in valid event of grid1.column3.text.validSELECT partycd IF cdrt#0 APPEND BLANK REPLACE accode WITH customer.accode KEYBOARD '{DNARROW}' ENDIFwarm regards,