>Appreciate your post..I'm not so much interested in getting the focus to behave in a certain way, but am more interested in finding out how Foxpro works in this situation. If a modal form creates another and the new modal form gets focus, does some stuff and then closes, does focus go somewhere on the original form by default when this new form closes? Just wondering if Foxpro tries to put focus back on the widget that had focus before the new modal form was created...or if it gives the Form itself focus and no particular widget.....or none of the above, maybe focus isn't even given back to the original modal form when the new modal form is released.
Well, as you know, control returns to the line of code directly after your call to the 2nd modal form or messgbx. AFAIK focus should stay on the control you last "clicked on"; maybe your code is somehow "dropping off" the control and thisis why you get the C5. The reason for my suggestion was to firm up WHAT happends to control after the call, i.e. where the cursor should be. Whether or not you try what I suggested I think it'd be worth setting focus to SOME control after the call - then see if it still C5s.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.