Muchisimas gracias es exactamente lo que necesitaba, lo probé y
funcionó a la perfección.
de Nuevo gracias por tu ayuda.
Saludos
Enrique Martinez
El día 25 de marzo de 2011 13:52, Fabricio
<fabricio...@hotmail.com> escribió:
Saludos
Enrique Martinez
Jairo
Azael Allan
Allan la que te indica walter es la que mas se usa, también se puede hacer con dos objetos
Un textbox y un listbox .
1. En un textbox.: A medida que escribes aparcen las ucurrenicias , no olvides poner el set exact en off
En el interactiveChange del textbox
InInsercionp=This.SelStart
lcBuscarstr=ALLTRIM(Substr(This.value,1,InInsercionp))
IF !EMPTY(lcBuscarstr)
WITH Thisform
SELECT MAE_PROD
SET ORDER TO tag codigoID
IF SEEK(lcBuscarstr)
This.Value = cod_prod
ELSE
THIS.VALUE=lcBuscarstr
ENDIF
ENDWITH
ELSE
THIS.VALUE=SPACE(0)
ENDIF
THIS.SELSTART=InInsercionp
2. En un texbox y un listbox
En el interactiveChange del textbox
LOCAL nIndex
WITH Thisform.gframes1.Page1
.List2.visible = .T.
FOR nIndex = 1 TO .List2.ListCount
IF UPPER( .List2.ListItem(nIndex)) = UPPER( ALLTRIM( this.Value ) )
.List2.ListIndex = nIndex
EXIT
ENDIF
ENDFOR
.List2.Refresh
ENDWITH
En el Click del Listbox - crear un entorno de datos ordenado por el codigoID
WITH Thisform
SELECT MAE_PROD
SET ORDER TO tag codigoID
IF SEEK(This.value)
This.Value = cod_prod
ELSE
THIS.VALUE=lcBuscarstr
ENDIF
ENDWITH
this.Visible = .F.
Espero te sirva