Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keep Focus on Text Field
Message
De
10/02/2009 12:11:22
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01380581
Message ID:
01380589
Vues:
51
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform