I am about to give up trying to find a work-around for this problem. Have an embedded browse of one table and one field on browse. Records already entered. On entering a new record, press enter and record saved and ready for next entry. Press Esc, new record entry canceled and last record of browse has focus.
Now, if there was a way to code in pressing the esc key, all would be fine and dandy. Sys_send_keys("{Esc}") doesn't work in the field rules CanSaveRecord event. Have tried all the suggestions found so far on this "problem":
t=table.current() ' or t=table.get("dailyentries")
if t.fieldone="" .and. t.fieldtwo="" '(two fields are blank)
if is_object("dailyentries")
:dailyentries:browse1.cancel()
end if
end
end ifDoesn't seem to make any difference whether the form is modal or modeless, or whether "continuous enters" is checked or not.t=table.current() ' or t=table.get("dailyentries")
if t.fieldone="" .and. t.fieldtwo="" '(two fields are blank)
cancel()
end if
end
end if
Has anybody found a way around this problem that works?
Thanks.
Ernie
Bookmarks