Yes, I have all my validation in my business objects. I was just trying to show you that you can get around the problem of the toolbar buttons not getting focus and so the valid of a control with focus never running. The example probably wasn't very effective as I haven't had to do this in many many years since it is all handled by the framework I use which makes use of toolbars without any problems.

Maybe I'll get some time in the next few days to look at your example.

Frank.

Frank Cazabon

On 31/01/2013 02:09 PM, Ken Dibble wrote:

I haven't time to set up the code you sent, but if I understand what you are trying to show, add one line of code to the start of the click method of the toolbar button, before your messagebox:

_Screen.ActiveForm.ActiveControl.SetFocus()

That doesn't work. The control gets focus, then the messagebox runs, and the form shuts down.

Even if there was some way to make this work, it's a bad idea to tie validation code to the controls that display the data. If you need to handle the same data elsewhere, now you have to duplicate your validation code.

Ken Dibble
www.stic-cil.org


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to