Problemas con el foco de text box
hola amigo tengo este código en el evento keypress del text1
IF nKeyCode=13
SELECT * from nacidos WHERE ALLTRIM(numerovaca)=ALLTRIM(this.Value)and (estado)="t" INTO CURSOR cur_destetes
        IF RECCOUNT("cur_destetes")>0
             thisform.text2.Value=cur_destetes.nombre 
                       thisform.text3.Value=cur_destetes.numerocria
        ELSE
              MESSAGEBOX("registro no encontrado",48," error")
                 thisform.text1.Value=""
                this.SetFocus
                 ENDIF
endif
el problema es que si no encuentra el registro no me regresa el el foco al text1 sino lo coloca en el otro text box
te agradezco me ayudes con esto
1 Respuesta
                    Respuesta de Hector Cevallos                
                
        
        
            
                1
              
        
        
        
            
            
        
    
                