Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rene Relucio
  Where is Rene Relucio?
 Quezon City
 Philippines
 Rene Relucio
 To: Rene Relucio
  Where is Rene Relucio?
 Quezon City
 Philippines
 Rene Relucio
 Tags
Subject: RE: How to eliminate the Return Value from Vali...
Thread ID: 16112 Message ID: 16237 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Sunday, October 13, 2002 12:20:41 PM         
   


> When I am in a non-editing mode, my cancel or save buttons are disabled. When I am in a editing mode, my cancel and save buttons are enabled.
> In the valid event, my first statement would be:
>
> If thisform.cancelbutton.enabled = .f.
> return .t.
> endif
>
> Whenever you press save or cancel, disabling the save and cancel buttons in the click event of these buttons might work.
> I also do not permit saving a record with invalid data. I test a status of a variable associated to a field if valid or not (.t. or .f.) before I save the data If .f., I setfocus the cursor to the invalid field. I usually embed these testing statements in the click event of savebutton.
> I wish this helps

I would also apply the following

Under Valid:

if empty(this.value)
this.value = oldval(fieldname)
endif
if this.value = oldval(fieldname)
return .t.
endif

before i press the cancel button, i will require the user to clear the textbox.




ENTIRE THREAD

How to eliminate the Return Value from Valid Event Posted by Terrence Ho @ 10/9/2002 11:32:22 AM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/9/2002 2:06:26 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/9/2002 3:33:02 PM
RE: How to eliminate the Return Value from Vali... Posted by Michael Gill @ 10/9/2002 9:18:16 PM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/9/2002 10:25:08 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/10/2002 12:09:29 AM
RE: How to eliminate the Return Value from Vali... Posted by aktayal @ 10/10/2002 6:23:06 AM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/10/2002 1:18:42 PM
RE: How to eliminate the Return Value from Vali... Posted by Travis Pick @ 10/10/2002 3:14:05 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/10/2002 4:20:12 PM
RE: How to eliminate the Return Value from Vali... Posted by RENE RELUCIO @ 10/11/2002 2:24:36 PM
RE: How to eliminate the Return Value from Vali... Posted by Rene Relucio @ 10/13/2002 12:20:41 PM
THANKS EVERYBODY Posted by Terrence Ho @ 10/15/2002 7:35:46 PM