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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text field question 1

Status
Not open for further replies.

kraus

MIS
Oct 16, 2000
23
US
i have multiple fields on a pageframe.
i need to know the best way keep the user
from leaving a field when the user has entered
an error in data.

i've tried 'this.setfocus' in the field's valid and
lostfocus events, but i can't prevent the cursor from
leaving the field.

thank you,
matt kraus
 
Returning 0 from valid will keep the user from leaving the field.

You can also return .f. which does the same thing but the you get the default VFP error message, using zero allows you to customize the message with a wait window or a message box as appropriate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top