Thanks for any ideas.
I am using VB 6.0. I have a one column MS Flexgrid where a user can click on a repair service number. A vehicle may have many repair service numbers and a comment for each repair service number. The application is designed to record a particular repair service number without a comment. If user decides to quit and not input any comments for that service number, only the repair service number will be recorded.
Service numbers are entered in the system via a textbox.
If I highlight a repair service number in the MSFlexgrid, the correct comments appear in a textbox below. That works fine. The application is also designed to automatically record any data in the textbox after the user closes the form, clicks on the same repair service number or different repair service number in the MSFlexgrid.
Using a lostfocus event in the textbox to record a comment with that service repair number works fine except when clicking on a different service repair number in the MSFlexgrid. What's happening is when a different service repair number is chosen in the MSFlexgrid, focus goes directly to the MSFlexgrid entercell before going to the lostfocus event, which is responsible for recording the comment with the appropriate service repair number.
I lose data once focus has left the textbox without recording it with the right service repair number. A MSFlexgrid entercell event houses code for displaying the next record using the arrow keys or mouse pointer click.
Question?????? What can I put in the MSFlexgrid to prevent the system from going to the MSFlexgrid entercell "first" instead of the lostfocus event of the textbox control? Please explain! I was under the impression that a lostfocus event would fire before going to another control, in this case, back to the MSFlexgrid.