*lcType = MyTable.TypeField lcType = mac1.nam&& mytablename is mac1,myfield is nam&& alias'mac1'is not found Select Temp && you're STILL using specific work areas - such as Select 3, rather than the ALIAS!!!! LOCATE FOR TYP = lcType IF !FOUND() APPEN BLANK REPLACE TYP WITH lcType in TEMP GO top thisform.grid1.refresh ELSE =MESSAGEBOX("found.....") endif>Because you're NOT doing it as I outlined in MY reply to you (see at second example of this message). You're still getting the Type from THISFORM.GRID2.column1.text1.VALUE. Well WHICH textbox in the grid, from the whole column? As I said, your current record on the grid gives you the selected value.
>>LPARAMETERS nColIndex >>thisform.text3.value=>? thisform.text3.value&& i see io2 >>lcType = TRIM(UPPER(THISFORM.text3.VALUE))&& >>? lcType && i see io1 and io2 >>SELECT 3 >>*USE temp IN 0 >>LOCATE FOR TYP = lcType >>IF !FOUND() >> APPEN BLANK >> REPLACE TYP WITH lcType in TEMP&& replace 2 records ,it must append one record >> GO top >> thisform.grid1.refresh >>ELSE >> =MESSAGEBOX("found.....") >>endif >>>>>M
>>>LPARAMETERS nColIndex >>> >>>lcType = MyTable.TypeField >>>Select Temp && you're STILL using specific work areas - such as Select 3, rather than the ALIAS!!!! >>>LOCATE FOR TYP = lcType >>>IF !FOUND() >>> APPEN BLANK >>> REPLACE TYP WITH lcType in TEMP >>> GO top >>> thisform.grid1.refresh >>>ELSE >>> =MESSAGEBOX("found.....") >>>endif >>>>>>
>>>>LPARAMETERS nColIndex >>>>LOCATE FOR temp.typ=THISFORM.GRID2.column1.text1.VALUE >>>>IF !FOUND() >>>> SELECT 3 &&mytablename is temp >>>> APPEN BLANK >>>> REPLACE temp.typ WITH THISFORM.GRID2.column1.text1.VALUE >>>> GO top >>>> thisform.grid1.refresh >>>> >>>>ELSE >>>> =MESSAGEBOX("found.....") >>>>endif >>>> >>>>>>>>thanks.