Hi all
I have a data entry form with some text fields and <save> and <cancel> buttons. My issue is that when focus is on a text box and cancel button is clicked the valid event of the text box fires and user has to click on ok on the messagebox that appears and then again click on cancel button
sample code
rkey = Readk()
If _rkey()
If Not Empty(This.Value)
helpselected = .F.
helpcode = ''
helpname = ''
=namehelp("Centres Master",'master_centres','centre_code','centre_name',Allt(This.Value))
If helpselected
This.Value = helpname
Thisform.centre_code = helpcode
thisform.getstate()
thisform.Refresh()
Endif
Else
Thisform.centre_code = ''
Endif
Endif
end of sample code
is there any way I can avoid this?
thanks in advance
I have a data entry form with some text fields and <save> and <cancel> buttons. My issue is that when focus is on a text box and cancel button is clicked the valid event of the text box fires and user has to click on ok on the messagebox that appears and then again click on cancel button
sample code
rkey = Readk()
If _rkey()
If Not Empty(This.Value)
helpselected = .F.
helpcode = ''
helpname = ''
=namehelp("Centres Master",'master_centres','centre_code','centre_name',Allt(This.Value))
If helpselected
This.Value = helpname
Thisform.centre_code = helpcode
thisform.getstate()
thisform.Refresh()
Endif
Else
Thisform.centre_code = ''
Endif
Endif
end of sample code
is there any way I can avoid this?
thanks in advance