Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem calling a form from a TextBox in a grid
Message
From
01/12/2004 10:15:42
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00966037
Message ID:
00966077
Views:
8
Hi Emmanuel,

>Hi all, I'm calling a form from the valid event of a grid's textbox. All seems to work fine except that the focus is not passing to the next column after the validation is done. Here's the code.
>	This.Parent.Parent.Yapaso =.f.
>	IF  This.Value <= 0
>	   Messagebox("Precio No Puede Ser Cero",0+64+0,"Aviso")
>	   This.value = This.Parent.Parent.OldValue
>	   Return 0
>	ENDIF
>
>	IF Thisform.Setup01.Fields("ControlarPrecio").Value
>		IF This.Value<cCompra.Costo
>			Thisform.Mensaje("Precio NO Puede Ser Menor Que el Costo Del Artículo!",1)
>			RETURN 0
>		ENDIF
>	ENDIF
>	
>	lAutorizar=.t.
>	If (this.value < cCompra.precio2)
>	   IF Messagebox("No Puede Facturar Este Artículo Por Debajo del Precio Mínimo"+CHR(13)+;
>	       "Desea Facturar Con Este Precio De Todas Formas?",4+32+256,"Aviso")=6
>		   DO FORM autorizar01 TO lAutorizar
>		   IF lAutorizar
>		      This.value = This.Parent.Parent.OldValue
>		      RETURN 0
>		   ENDIF
>	  ELSE
>	      This.value = This.Parent.Parent.OldValue
>	      RETURN 0
>	  ENDIF
>	Endif
>	This.Parent.Parent.calcular
>What am I missing?
>Enmanuel

What's value returned in lAutorizar? Maybe it has .T. and it did Return 0. See your code...
IF lAutorizar
   This.value = This.Parent.Parent.OldValue
   RETURN 0
ENDIF 
What do you think?
Erick
Força Sempre!
Strength Always!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform