Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keep Focus on Text Field
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01380581
Message ID:
01380589
Views:
50
>The Code below is in a txt.LostFocus()
>
>If the user gets an error I need to stay focused on that text
>
>How is that done??
>
>
>IF !INLIST(UPPER(ALLTRIM(this.Value)),'YES','NO')
> =MESSAGEBOX('Invalid Data : Must be YES or NO',0 + 16,'Invalid Data')
> this.Value = ''
> ******************************
> *-- I NEED TO ADD CODE HERE TO KEEP FOCUS ON THIS TEXT FIELD
> ******************************
>ELSE
> thisform.Calculate()
>ENDIF
IF !INLIST(UPPER(ALLTRIM(this.Value)),'YES','NO')
	=MESSAGEBOX('Invalid Data : Must be YES or NO',0 + 16,'Invalid Data')
	this.Value = ''
                ******************************
                *-- I NEED TO ADD CODE HERE TO KEEP FOCUS ON THIS TEXT FIELD
      this.SetFocus()
      NoDefault
                * or some minor variation thereof    
                ******************************
ELSE
	thisform.Calculate()	
ENDIF
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform