|    
			
				10/05/2002, 12:53
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: mayo-2002 Ubicación: Mexico DF 
						Mensajes: 119
					 Antigüedad: 23 años, 5 meses Puntos: 0 |  | 
  |  Re: codigo para busar error  
  Prueba esto amigo, no creo que habia necesidad de anidar los If
 
 if (comercial="*") and (fechaini="") and (fechafin="") then
 
 strsql = "select * from visitas "
 
 End if
 
 if (comercial='*') and (fechaini<>"") and (fechafin<>"") then
 strsql = "select * from visitas where fecha>="&fechaini& "and" &fecha<=fechafin
 End if
 
 if (fechaini="") and (fechaini="") then
 strsql="select * from visitas where dni=" &comercial
 End If
 
 if (fechaini="") and (fechaini="")and (comercial<>"") then
 strsql="select * from visitas where dni= " &comercial& "and fecha >= " & fechaini & " and fecha <= "&
 End if
 
 Saludos
     |