Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/03/2008, 15:41
Yerim
 
Fecha de Ingreso: febrero-2008
Mensajes: 27
Antigüedad: 16 años, 2 meses
Puntos: 0
ayuda para unir consulta

Hola, un saludo a todos y quiero agradecer el apoyo de ustedes con sus respuestas.

Estoy armando mi consulta ahi esta el codigo, pero al momento de ejecutar me manda error en la sintaxis de Like, espero alguien pueda ayudarme con este problemita.

Dim condicion As String
condicion = ""

If Trim(placa1) <> "" Then
condicion = condicion & "(NOMBRE Like '%" & nombre & "%')and"
End If

If Trim(nombre1) <> "" Then
condicion = condicion & "(CALLE Like '%" & calle & "%')and"
End If

If Len(condicion) Then
If Right(condicion, 4) = "and" Then
condicion = Left(condicion, Len(condicion) - 4)
End If
End If

Dim consulta1 As String
consulta1 = " SELECT * from ALUMNOS Where" & condicion