FoxPro/Visual FoxPro - Problema con form

 
Vista:

Problema con form

Publicado por Fabio (10 intervenciones) el 07/05/2008 02:36:41
hola amigos del foro estoy realizando un programa de carga de articulos en un form el cual esta compuesto por un pageframe de 2 hojas en el primer hoja estan todo los datos del articulo en el cual hace la busqueda mediante el codigo de articulo y enla segunda es para la busqueda incremental por nombre de articulos cuando no conozco el codigo. primeramente desabilito todos los item y dejo habilitado el codigo de articulo en el cual valido el mismo q no sea menor ni igual a cero pero el problema suge q cuando quiero habilitar la segunda page no lo realiza utilizo la funcion dentro dela validacion on key label habiliatando la misma si alguien me podria ayudar a resolver o cambiar el metodo o alguna sugerencia desde ya les agradeco mucho. estos son los codigos dentro del page1:

lost focus event:
select medins
set order to codmein
seek(thisform.Pageframe1.Page1.Txtcodmein.value)
if found()
xexiste="S"
ThisForm.Pageframe1.Page1.Txtdesmein.value=desmein
ThisForm.Pageframe1.Page1.Txttippre.value=tippre
if ThisForm.Pageframe1.Page1.Txttippre.value="U"
ThisForm.Pageframe1.Page1.label18.caption="NIDAD"
else
if ThisForm.Pageframe1.Page1.Txttippre.value="C"
ThisForm.Pageframe1.Page1.label18.caption="AJA"
else
ThisForm.Pageframe1.Page1.label18.caption="IDÓN"
endif
endif
ThisForm.Pageframe1.Page1.Txtcodpre.value=codpre
ThisForm.Pageframe1.Page1.Txtdespre.value=presenta.despre
ThisForm.Pageframe1.Page1.Txtpreuni.value=preuni
ThisForm.Pageframe1.Page1.Txtprebul.value=prebul
ThisForm.Pageframe1.Page1.Txtstomin.value=stomin
ThisForm.Pageframe1.Page1.Txtstock.value=stock
ThisForm.Pageframe1.Page1.Txtstobul.value=stobul
ThisForm.Pageframe1.Page1.Txtfecalt.value=fecalt
ThisForm.Pageframe1.Page1.Txtfeven.value=feven
ThisForm.Pageframe1.Page1.Txtfeulin.value=feulin
ThisForm.Pageframe1.Page1.Txtfeuleg.value=feuleg
ThisForm.Pageframe1.Page1.Txtcodmar.value=codmar
ThisForm.Pageframe1.Page1.Txtdesmar.value=marcas.desmar
ThisForm.Pageframe1.Page1.Txtcodpro.value=codpro
ThisForm.Pageframe1.Page1.Txtnompro.value=proveedo.nompro
ThisForm.Pageframe1.Page1.edtobser.value=obser
thisform.Pageframe1.Page1.commandgroup1.command2.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command3.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command5.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command6.enabled=.t.
thisform.Pageframe1.Page1.commandgroup2.command1.enabled=.t.
thisform.Pageframe1.Page1.commandgroup2.command2.enabled=.t.
thisform.Pageframe1.Page1.commandgroup2.command3.enabled=.t.
thisform.Pageframe1.Page1.commandgroup2.command4.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command3.setfocus
else
xexiste="N"
thisform.Pageframe1.Page1.commandgroup1.command1.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command5.enabled=.t.
thisform.Pageframe1.Page1.commandgroup1.command6.enabled=.t.
endif
thisform.Pageframe1.Page1.Txtcodmein.enabled=.f.
thisform.Pageframe1.Page2.enabled=.f.

key press event:
LPARAMETERS nKeyCode, nShiftAltCtrl

valid event :
if thisform.Pageframe1.Page1.Txtcodmein.value<=0
messagebox("Código de Medicamento ó Insumo tiene que ser mayor a '0'",0,"Atenciòn!!!")
return .f.
else
return .t.
endIf
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 4
Ha aumentado su posición en 2 puestos en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

RE:Problema con form

Publicado por kong (682 intervenciones) el 07/05/2008 09:41:34
hola,
Parece que quieres presionar F1 para que el foco salte a la otra pagina, no?
Pues el KeyPress de tu TextBox deberia de funcionar, lo unico que deberias de agregar antes del setfocus es NODEFAULT
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar