At 10:09 2013-01-31, Ken Dibble <[email protected]> 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.

So set up a procedure for the code. I have a number of validation routines in my app that are called by various forms. 1603 lines of it. That is not all the validation, but it is stuff that could easily be broken out and is likely to be used in multiple places.

Sincerely,

Gene Wirchenko


_______________________________________________
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/20130131221401.XIKH15363.priv-edmwes04.telusplanet.net@edmwcm03
** 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