Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with FormSet

Status
Not open for further replies.

cslawtom

MIS
Sep 3, 2001
161
0
0
HK
Hi All,

I have the following problem and hope someone could give me advice.

I have a FormSet with 2 forms i.e. toolbar (Form A) and data form (Form B)

Say in Form A, there are 2 buttons - (1) save (2) cancel
and in Form B, 3 text boxes. Each text box contains CODE in LostFocus method or in Valid method. Validation is doing inside those methods.

But the problem is, if I input something insides the text box in Form B then click on the button in Form A with press the TAB or ENTER. The LostFocus method or Valid method do not activate.

Please help.

 
Since a toolbar can never receive focus, you are correct the lostfocus() and valid() events will not fire. This is a Windows standard. You'll need to add code to the click event methods of the command buttons on the toolbar to check the true "current control" and invoke it's lostfocus() and/or valid() methods (if they exist).

Rick
 
Hi Rick,

Thanks.

But could you give example. Thanks in advance.
 
Sorry,
I avoid toolbars for many reasons, and this complication is just one of them. I hope someone who has ventured into this area will post some code or provide you with an alternate solution.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top