
problema con un if
Publicado por jean carlos (13 intervenciones) el 10/02/2012 02:01:08
este codigo l tengo para los tipos de usuarios: el cual quiero que si mi nivel de seguridad es mayor de 3 me arroje un mensaje y si no lo es se guarde. lo estoy trabajando con el Text5. y me sale que TeXT5 falta la variable
IF NOT EMPTY(THISFORM.TEXT1.VALUE) AND NOT EMPTY(THISFORM.TEXT2.VALUE);
AND NOT EMPTY(THISFORM.TEXT3.VALUE) AND NOT EMPTY(THISFORM.TEXT4.VALUE)
SELECT 11 && Tabla Empleados
USU = Alltrim(Thisform.Text1.Value)
Locate for Alltrim(codusu) == USU
Thisform.Text5 = text5
text5 = Thisform.Text5
if text5 > 3
MESSAGEBOX(" Ingresar")
endif
IF .NOT. FOUND()
Append Blank
Replace edoreg with "A"
Replace codusu with Alltrim(Thisform.Text1.Value)
Replace nomusu with Alltrim(Thisform.Text2.Value)
Replace paswor with Alltrim(Thisform.Text3.Value)
[b]
If Text5 < 3 Then
Replace nivel with Alltrim(Thisform.Text5.Value)
else
If Text5 > 3 Then
MESSAGEBOX(" Ingresar un Valor Menor")
ENDIF
ENDIF
[/b]
ELSE
Replace nomusu with Alltrim(Thisform.Text2.Value)
Replace pasword with Alltrim(Thisform.Text3.Value)
Replace nivel with Alltrim(Thisform.Text5.Value)
ENDIF
*Thisform.Text1.InteractiveChange
This.Enabled = .F.
Thisform.Refresh()
ELSE
MESSAGEBOX("Faltan Elementos por Ingresar")
ThisForm.Text1.SetFocus
ENDIF
*Thisform.Modificar.Click
IF NOT EMPTY(THISFORM.TEXT1.VALUE) AND NOT EMPTY(THISFORM.TEXT2.VALUE);
AND NOT EMPTY(THISFORM.TEXT3.VALUE) AND NOT EMPTY(THISFORM.TEXT4.VALUE)
SELECT 11 && Tabla Empleados
USU = Alltrim(Thisform.Text1.Value)
Locate for Alltrim(codusu) == USU
Thisform.Text5 = text5
text5 = Thisform.Text5
if text5 > 3
MESSAGEBOX(" Ingresar")
endif
IF .NOT. FOUND()
Append Blank
Replace edoreg with "A"
Replace codusu with Alltrim(Thisform.Text1.Value)
Replace nomusu with Alltrim(Thisform.Text2.Value)
Replace paswor with Alltrim(Thisform.Text3.Value)
[b]
If Text5 < 3 Then
Replace nivel with Alltrim(Thisform.Text5.Value)
else
If Text5 > 3 Then
MESSAGEBOX(" Ingresar un Valor Menor")
ENDIF
ENDIF
[/b]
ELSE
Replace nomusu with Alltrim(Thisform.Text2.Value)
Replace pasword with Alltrim(Thisform.Text3.Value)
Replace nivel with Alltrim(Thisform.Text5.Value)
ENDIF
*Thisform.Text1.InteractiveChange
This.Enabled = .F.
Thisform.Refresh()
ELSE
MESSAGEBOX("Faltan Elementos por Ingresar")
ThisForm.Text1.SetFocus
ENDIF
*Thisform.Modificar.Click
Valora esta pregunta


0