Programación General > Visual FoxPro

 Error IF|ELSE|ENDIF

(1/1)

Hoose:
El ejercicio esta en que debo crear una tabla y despues crear un programa con ALTAS, CONSULTA, LISTA, BUSCAR & BORRAR.
Debo hacerlo con Menús Despegables (PROMPT)
Llevo el siguiente código:


--- Código: Text ---opcion=0SET color TO GR+/B+    CLEAR    @ 10,5 PROMPT 'Altas ' MESSAGE 'Ingresa a la tabla nuevos datos'@ 13,5 PROMPT 'Consulta ' MESSAGE 'Ve los datos disponibles en la tabla'@ 16,5 PROMPT 'Listar ' MESSAGE 'Ve el orden de la tabla por registro'@ 19,5 PROMPT 'Bajas ' MESSAGE 'Eliminamos/Marcamos un registro para su baja' Menu to opcion IF opcion=1 then    STORE SPACE(15) TO ape1,ape2    STORE SPACE(20) TO nom    store SPACE(1) to co    @10,30 say 'ALTAS'@13,25 say 'Apellido Paterno' get ape1 picture "@!"@15,25 say 'Apellido Materno' get ape2 picture "@!"@17,25 say 'Nombre' get nom PICTURE "@!"READ USE tabla3bAPPEND BLANKReplace apellido_p with ape1Replace apellido_m with ape2Replace nombre with nom @19,25 say '¿Quieres continuar S/N?' GET co PICTURE "@!"READ    IF co='N' then        EXIT    ENDIFENDIF && Aqui inicia Consulta &&[color=#FF0000]IF opcion=2 then[/color] STORE 0 TO tecla    USE tabla3b    DO WHILE .T.        @10,30 say 'Registro No.   ' + STR(RECNO())    @13,25 say 'Apellido Paterno   ' + apellido_p    @16,25 say 'Apellido Materno   ' + apellido_m    @19,25 say 'Nombre   ' + nombre        tecla=INKEY()        IF tecla=1 then            CLEAR            GO top        ENDIF                IF tecla=6 then            CLEAR            GO bottom        ENDIF                IF tecla=27 then            CLEAR            EXIT        ENDIF                IF tecla=24 then            CLEAR            IF RECNO()=RECCOUNT() then                GO top            ELSE                skip+1            ENDIF        ENDIF                IF tecla=5 then            CLEAR            IF RECNO()=1 then                GO bottom            ELSE                skip-1            ENDIF        ENDIF                IF tecla=3 then            CLEAR            IF RECNO()<24 then                skip+5            ELSE                GO top            ENDIF        ENDIF                IF tecla=18 then            CLEAR            IF RECNO()>=5 then                skip-5            ELSE                GO bottom            ENDIF        ENDIFENDIFenddo   Visual me esta diciendo esto "An IF|ELSE|ENDIF  statement is missing
¿Alguna idea, pls?

Thnks!

arielb:
Hola, Revisa los endif el último no le encontré a cual IF le pertenece

Navegación

[0] Índice de Mensajes

Ir a la versión completa