Sorry, Sergey, this doesn't work. At least not in the way I am trying to implement it. I replaced my code in the editbox's SetFocus() event with the SYS(1500,'_MED_FIND','_MEDIT') command. In the Click() event of the command button I have the following code:
THISFORM.edtNotes.SetFocus()
Then in the SetFocus() event of the editbox I have this code:
=SYS(1500, '_MED_FIND', '_MEDIT')
Then I run the form and when I click the command button the editbox gets focus but the Find Dialog does not appear, no matter how many times I click the command button. I changed it to move the SYS(1500...) code to the command button immediately after the SetFocus() command. Now when I click on the command button it sets focus to the editbox but does not immediately open the Find Dialog. After about three clicks of the command button it will open the dialog. Then if I close the Find Dialog and click on the command button again the Find Dialog will come up immediately. If I close the window and try again it takes three clicks to cause the dialog box to open.
Jim White
Time is a wonderful teacher. Unfortunately it kills all of its students.