hi,
thanks, but i use this code under mygride column2.text1,
in this case i can't find BeforeRowColChange() Event.
i try at mygride column2.text1 Valid() Event i get error message
can't call set focus from within a when,valid rangehigh or range low event,
and why the same code cannot work under keypress and it works at click event without any problem.
m.qasem
>In general, you can put validation code in a TextBox Valid() Event. If a condition is not fulfilled, return .F. to avoid losing the focus.
>
>In the case of a grid, you might also try the BeforeRowColChange() Event. In this case, if the condition is not fulfilled, use the command NODEFAULT to avoid losing the focus.
>
>>hi all,
>>i need help to stop arrow up or arrow down at mygrid if the result via my code is false
>>
>> m.a=thisform.timeadd(thisform.timeadd(thisform.timeadd(thisform.timeadd(true,hot),balanc),mint),other)
>> m.w=thisform.timeadd(plan,("00:00:00"))
>>IF m.a=m.w and m.a>"00:00:00" and m.w>"00:00:00"
>> *=MessageBox("true")
>> grdTable = thisform.Grid1.RecordSource
>> thisform.Grid1.column7.SetFocus()
>> SKIP IN (grdTable)
>> IF EOF()
>> SKIP -1 IN (grdTable)
>> ENDIF
>>
>>ELSE
>> =MessageBox("false")
>> thisform.Grid1.column7.SetFocus()
>>ENDIF
>>
>>
>>thanks