FoxPro/Visual FoxPro - ayuda porfavor CON LA FUNCION FOUND

 
Vista:

ayuda porfavor CON LA FUNCION FOUND

Publicado por ASA (72 intervenciones) el 12/03/2007 17:57:24
TENGO 2 COMBOS UNO CIUDAD Y OTRO DEPARTAMENTO
CUANDO INGRESO EL DEPARTAMENTO EN EL COMBO DEPARTAMENTO Y LE DOY TAB O LO QUE SEA ME VALLA AL OTRO COMBO CIUDAD Y ME CARGUE TODAS LAS CIUDADES DEL DEPARTAMENTO NO MAS.
PENSE EN ALGO ASI PERO NO ME LLENA EL COMBO SI ES ASI DONDE LO POGO EN QUE PROCEDIMIENTO PORFAVOR ES ALGO URGENTE

Select 1
use departamento
Select 2
use ciudad
select 2
Locate for ciudad.departamen=Thisform.cmbdepartamento.value
If found() then
set filter to ciudad.departamento=ALLTRIM(Thisform.cmbCIUDAD.value)
else
endif
Set filter to
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:ayuda porfavor CON LA FUNCION FOUND

Publicado por Plinio (7841 intervenciones) el 12/03/2007 18:30:03
Si usas campos character para filtrar o comparar hazlo asi:
set filter to ALLTRIM(ciudad.departamento)==ALLTRIM(Thisform.cmbCIUDAD.value)
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
sin imagen de perfil

RE:ayuda porfavor CON LA FUNCION FOUND

Publicado por neo (1604 intervenciones) el 12/03/2007 18:35:45
tabla departamento:
depto
depto1
depto2
depto3

Tabla Ciudad:

depto ciudad
depto1 ciudad1
depto1 ciudad2
depto2 ciudad3
depto2 ciudad4
depto2 ciudad5
depto3 ciudad6
depto3 ciudad7

tomando como referencia esto, entonces sería asi:


En el Valid o LostFocus del combobox:

Select 1
use departamento
Select 2
use ciudad

select 2
Locate for ciudad.depto=Thisform.cmbdepartamento.value
If found() then
set filter to depto =Thisform.cmbdepartamento.value
endif
Set filter to
Thisform.refresh

Si el usuario elige depto1 entonces al perder el enfoque el combo "departamento"
el el otro combo "ciudad" aparecerá ciudad1 y ciudad2, y asi sucesivamente.

Suerte►
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

RE:ayuda porfavor CON LA FUNCION FOUND

Publicado por ASA (72 intervenciones) el 12/03/2007 20:22:27
muchas gracias
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