Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/04/2013, 10:57
Avatar de othix
othix
 
Fecha de Ingreso: mayo-2011
Ubicación: Guatemala
Mensajes: 92
Antigüedad: 13 años
Puntos: 9
Respuesta: Problema En Consulta

deberia ser algo asi

Código MySQL:
Ver original
  1. FROM INSUMO
  2. WHERE  
  3. ((mar_ins = '" & CboMarca.Text & "') OR('" & CboMarca.Text & "'='TODOS'))
  4. ((are_ins  = '" & CboArea.Text & "') OR('" & CboArea.Text & "'='TODOS'))
  5. ((fam_ins  = '" & CboFamilia.Text & "') OR('" & CboFamilia.Text & "'='TODOS'))
  6. ((emp_ins  = '" & CboEmpresa.Text & "') OR('" & CboEmpresa.Text & "'='TODOS'))

Si probas esto en sql deberia cumplor con tu necesidad

Código MySQL:
Ver original
  1. FROM INSUMO
  2. WHERE  
  3. ((mar_ins = 'Dell') OR('Dell'='TODOS'))
  4. ((are_ins  = 'TODOS') OR('TODOS'='TODOS'))
  5. ((fam_ins  = 'TODOS') OR('TODOS'='TODOS'))
  6. ((emp_ins  =  'TODOS') OR('TODOS'='TODOS'))

Saludos espero haberte ayudado.
__________________
"Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las mismas cosas."