with thisform
if empty(thisform.txtpac_nom.value)
messagebox("Error, exixten espacios vacios","Error")
THISFORM.TXTPAC_NOM.SETFOCUS
return
endif
if thisform.txtpac_nrocli.value = 0
messagebox("Error, Debe seleccionar un cliente","Veter 1.5")
thisform.command3.setfocus
return
endif
select 2
set dele on
set order to 1
go bottom
ux=pac000.pac_nro
append blank
rlock()
replace pac_ruta with ARCHIZ
repla pac_nro with ux+1
*.txtpac_nro.value
repla pac_nrocli with .txtpac_nrocli.value
repla pac_nom with .txtpac_nom.value
repla pac_raza with .txtpac_raza.value
repla pac_especi with .txtpac_especi.value
repla pac_color with .txtpac_color.value
repla pac_nacio with .txtpac_nacio.value
repla pac_ingre with .txtpac_ingre.value
repla pac_celo with .txtpac_celo.value
repla pac_murio with .txtpac_murio.value
repla pac_repro with .txtpac_repro.value
repla pac_castr with .txtpac_castr.value
*repla pac_socio with .txtpac_socio.value
repla pac_sexo with .txtpac_sexo.value
repla pac_datos with .txtpac_datos.value
flush
unlock all
? chr(7)
=MESSAGEBOX("PACIENTE GRABADO",64,"Veter 1.5")
thisform.text1.value=""
thisform.txtpac_nroCLI.value=0
thisform.refresh()
U=U+1
THISFORM.ACTIVATE()
thisform.init
thisform.image1.picture=""
thisform.reFRESH()
*THISFORM.command3.SETFOCUS
*thisform.release()
endwith
Espero te ayude mi codigo me hace acordar a mis primeras pantallas de diseño, tendrias que darle un toque mas elegante espero no te ofendas con este comentario.
saludos