FoxPro/Visual FoxPro - URGE !! SQL+GRID

 
Vista:

URGE !! SQL+GRID

Publicado por marcos (1 intervención) el 06/02/2002 15:36:52
hola amigos,
tengo un problema con una formulario, donde tengo un textbox y un grid.
En el evento valid del textbox tengo el siguiente codigo:

set safety off
bbuscar = +Upper(ALLTrim(Thisform.text2.value))+\\\\\\\\\\\\\\\"%\\\\\\\\\\\\\\\"
Select clientes.idcliente as \\\\\\\\\\\\\\\'Código\\\\\\\\\\\\\\\',clientes.nom as \\\\\\\\\\\\\\\'Nombre\\\\\\\\\\\\\\\',clientes.direccion as \\\\\\\\\\\\\\\'Dirección\\\\\\\\\\\\\\\',clientes.telefono as \\\\\\\\\\\\\\\'Teléfono\\\\\\\\\\\\\\\' from clientes ;
where clientes.idcliente Like \\\\\\\\\\\\\\\"&bbuscar\\\\\\\\\\\\\\\" ORDER BY clientes.idcliente into cursor buscarclientes
Thisform.Grid1.RecordSourceType=1
Thisform.Grid1.RecordSource=\\\\\\\\\\\\\\\'buscarclientes\\\\\\\\\\\\\\\'
thisform.grid1.Column1.width =50
thisform.grid1.Column2.width =200
thisform.grid1.Column3.width =80
thisform.grid1.Column4.width =80

Tengo un boton en el formulario VER CLIENTE a partir del cual una vez selecionado el cliente en el grid, pincho en el boton, y accedo a la ficha del cliente que es otro form. El codigo del boton es este:

variable=Código
select clientes
set order to tag idcliente
seek variable
IF FOUND()
nRegistro=recno()
do form g:\\\\\\\\\\\\
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