Tema: buscador
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/01/2008, 08:53
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 18 años, 3 meses
Puntos: 126
Re: buscador

Maykire tienes toda la razón en lo que dices pero no crees que el operador "and" hará que la sentencia no funcione, tal y donde está colocada?

Query = "select * from anuncio WHERE "
If Not IsEmpty(Paili) Then
Query = Query + "Pais like '%" & Paili & "%' "
End If
If Not IsEmpty(Pro) Then
Query = Query + "and Provincia like '%" & Pro & "%' "
End If
...
etc
...
Query = MID(Query, 1, LEN(Query)-4)
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />