This might help you if you are using VFP8. I'm not sure if HWnd is already in VFP7. See comments.
_screen.ActiveForm.CustomerNoText.SetFocus()
nWHnd = _screen.ActiveForm.HWnd
_screen.ActiveForm.CustomerNoText.value = 'CUSTOMER01'
keyboard "{enter}"
if nWHnd # _screen.ActiveForm.HWnd
endif
>After this keyboard event there is a messagebox that informed the user that the customer have already exceed the credit limit. This ask the user where to proceed or not by clicking "Yes" or "No" button. I know that I can pass a keyboard event wether to proceed or not.
Are you running the EXE from a PRG? I'm not sure how to keyboard the modal messagebox().
ramil
~~ learning to stand still