mensaje de error en combobox
Publicado por maxi (10 intervenciones) el 11/05/2016 18:32:08
buenas gente yo necesitaria un poco de ayuda por que tengo un combobox que al apretar el boton procesar me tiene que hacer un par de calculos pero en el caso de que no seleccione nada que me tire un mensaje de error
el problema es que sino selecciono nada me hace el calculo como si hubiera elegido la primera opcion
el problema es que sino selecciono nada me hace el calculo como si hubiera elegido la primera opcion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
If thisform.combo1.Value= " "
=MESSAGEBOX("no selecciono ningun tipo de llamado")
endif
DO case
CASE thisform.combo1.Value="Local"
xtip=1
CASE thisform.combo1.value="DDN"
xtip=2
CASE thisform.combo1.Value="DDI"
xtip=3
OTHERWISE
xtip=4
ENDCASE
IF xtip=4
SELECT COUNT(*) AS CANT, SUM(PULNOV) AS CANTPUL,;
SUM(PULNOV*PRETAB) AS IMPORT;
FROM NOVEDADE, ABONADO, TABLAP;
WHERE NOVEDADE.NRONOV=ABONADO.NROABO AND;
NOVEDADE.TARNOV=TABLAP.CODTAB;
INTO CURSOR TMP2
ELSE
SELECT COUNT(*) AS CANT, SUM(PULNOV) AS CANTPUL,;
SUM(PULNOV*PRETAB) AS IMPORT;
FROM NOVEDADE, ABONADO, TABLAP;
WHERE NOVEDADE.NRONOV=ABONADO.NROABO AND;
NOVEDADE.TARNOV=TABLAP.CODTAB AND TARNOV=XTIP;
INTO CURSOR TMP2
ENDIF
thisform.text1.Visible= .T.
thisform.text2.Visible= .T.
thisform.text3.Visible= .T.
thisform.text1.Value=tmp2.cant
thisform.text2.value=tmp2.CANTPUL
thisform.text3.value=tmp2.import
thisform.Refresh
Valora esta pregunta


0