FoxPro/Visual FoxPro - CODIGO!!!

 
Vista:

CODIGO!!!

Publicado por Raul (151 intervenciones) el 20/12/2004 17:35:33
BUENOS DIAS AMIGO, TENGO UNA DUDA EN EL SIGUIENTE CODIGO

PUBLIC multiplica,suma
STORE 0 TO suma
SELECT captnom
DO WHILE !EOF()
IF thisform.combo1.Value = ALLTRIM(captnom.cnomproy) AND thisform.combo2.Value = ALLTRIM(captnom.cnombre) AND captnom.nent = 1
thisform.grdCaptnom.column4.BackColor=RGB(255,255,255)
thisform.grdCaptnom.column5.BackColor=65280
thisform.grdCaptnom.column6.BackColor=65280
multiplica = captnom.nnument * captnom.nprecio
suma = suma + multiplica
ENDIF
SKIP
ENDDO
Thisform.text1.Enabled= .T.
Thisform.text1.Value = suma
EN MI BD TENGO:
NOMBRE NO.ENTREVISTAS PRECIO TOTAL
RAUL 3 10 30
RAUL 2 25 50
JESUS 5 15 75
JESUS 1 10 10

LO QUE QUIERO HACER ES QUE ME MUESTRE POR EJEMPLO;
NOMBRE TOTAL
RAUL 80
JESUS 85
ESTA BIEN EL COODIGO???, LOS NOMBRES SE SELECCIONAN DE UN COMBO QUE TIENE MI FORM, OJALA HAYAN ENTENDIDO Y GRACIAS.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:CODIGO!!!

Publicado por David Fúnez (24 intervenciones) el 21/12/2004 22:14:47
No te sale mejor hacerlo con SUM....

SELECT captnom
SUM nnument *nprecio TO valor FOR nombre="JESUS"
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar