dardapu
Programmer
- Sep 10, 2002
- 67
In FPW26 I have a I modulate of billing in that I want to use a browse and a control button the one that Records or it Cancels the operation.
If the browse this hole the button when selecting to Cancel this work well.
If the browse has data, the button always returns me 1 although it is selected the to Cancel whose variable should return 2.
The sequence is:
do while .t.
acti wind botonera
m.op=0
@ 0.438,1.000 GET m.op ;
PICTURE "@*HT Grabar;Cancelar" ;
SIZE 1.769,10.500,0.667 ;
FONT "MS Sans Serif", 8 ;
STYLE "B"
ON KEY LABEL alt+f12 ACTIVATE WINDOW botonera,muestra &&activa wind browse and buttons
ON KEY LABEL ESC *
sele detalle
acti wind muestra
Browse Field cart :h='Código' :f :v=VBusca(cart),;
cant :h='Cantidad'
='@Z 9,999,999.99' :f :v=VCant(cant),;
nart :h='Descripción' :f :w=EMPTY(nart),;
part :h='Precio Unit.'
='@Z 999,999.999' ,;
importe = cant*part
='@Z 9,999,999.999' :f :v=VSalta() ;
save NoClear in Window muestra
KEYBOARD '{rightarrow}{alt+f12}'
read cycle modal with detalle,botonera
DO CASE
CASE m.op=2
=beep(2)
wait wind nowai "It has Selected to Annul... " time 1
deac wind botonera
on key label escape
on key label f9
flag=1
clear read
RETURN
CASE m.op=1
sele detalle
count to contar for !empty(cart) and !empty(importe)
if contar=0
??chr(7)
=msgbox(" bills without data, verify","",48)
loop
endif
..........
Some idea as solving this problem?
Thank
If the browse this hole the button when selecting to Cancel this work well.
If the browse has data, the button always returns me 1 although it is selected the to Cancel whose variable should return 2.
The sequence is:
do while .t.
acti wind botonera
m.op=0
@ 0.438,1.000 GET m.op ;
PICTURE "@*HT Grabar;Cancelar" ;
SIZE 1.769,10.500,0.667 ;
FONT "MS Sans Serif", 8 ;
STYLE "B"
ON KEY LABEL alt+f12 ACTIVATE WINDOW botonera,muestra &&activa wind browse and buttons
ON KEY LABEL ESC *
sele detalle
acti wind muestra
Browse Field cart :h='Código' :f :v=VBusca(cart),;
cant :h='Cantidad'
nart :h='Descripción' :f :w=EMPTY(nart),;
part :h='Precio Unit.'
importe = cant*part
save NoClear in Window muestra
KEYBOARD '{rightarrow}{alt+f12}'
read cycle modal with detalle,botonera
DO CASE
CASE m.op=2
=beep(2)
wait wind nowai "It has Selected to Annul... " time 1
deac wind botonera
on key label escape
on key label f9
flag=1
clear read
RETURN
CASE m.op=1
sele detalle
count to contar for !empty(cart) and !empty(importe)
if contar=0
??chr(7)
=msgbox(" bills without data, verify","",48)
loop
endif
..........
Some idea as solving this problem?
Thank