If I understand you correctly, what you want is to shut off validation until the user hits the edit button.

What I usually do is simply set enable .f. to all textboxes, setting their disableforecolor to rgb(0,0,0) (black) so the field contents can be seen clearly.

When the user hits the edit button, the enable property is set to .t. Likewise, after she hits the cancel or save buttons, the setting reverts to .f.

In this way, the user can navigate the table without any unwanted validation code firing until it is really necessary

Rafael Copquin



El 18/06/2013 05:50 p.m., Gene Wirchenko escribió:
Dear Vixens and Reynards:

Once more, I am doing battle with the form event model. I did not want a fight, but it appears that I have one.

I have validation on fields. What I want to do is be able to turn this off until the form is ready for user input. How can I do this?

One possibility that I have thought of is using Form::KeyPress to detect the first keypress. I do not think that this will work, because I have to have a keyboard command in one gotfocus to handle a VFP bug. (I actually have to move off the field then back on, because otherwise, the cursor does not get set to the part of the field that I want (the day part of a date).

I have a flag property that I use for determining whether to do validation, and it works fine during normal use. During initialisation, with all of the events firing, it does not work. I think it would *IF* I could determine where I could reset the flag.

     Any ideas what I can do here?

Sincerely,

Gene Wirchenko


[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