Open "select FRECUENCIA from Frecuencia where H/L = (select H/L from Frecuencia where H/L= '"variablexancho"') and CANAL = ("select CANAL from Frecuencia where CANAL = variablecanal) and ANCHO DE BANDA =("select ANCHO_DE_BANDA from Frecuencia where ANCHO DE BANDA = '" & variableancho& "') and BANDA = ("select BANDA From Frecuencia where BANDA = ' &variablebanda &')"
SELECT campo1 FROM tabla1 WHERE campo1 = condicion1 AND campo2 = condicion2 AND campo3 = condicion3 AND... AND campoN = condicionN
select FRECUENCIA from Frecuencia where CANAL = ' & variablecanal & ' and ANCHO_DE_BANDA = '" & variableancho & "' and BANDA = ' & variablebanda & ' and H/L = '" & sitio & "' "
pero me dice q faltan argumentos, quisiera saber cual es la frecuencia q cumple con las 4 condiciones anteriores y asignarla a un textbox y lo hago mediante este comandoText13.Text = RSxancho.Fields("Frecuencia").Value
Estás trabajando con VB ¿no?, creo que tienes problemas de sintaxis.Código: SQL
" select FRECUENCIA from Frecuencia where CANAL = " & variablecanal &" and ANCHO_DE_BANDA = '" & variableancho & "' and BANDA = '" & variablebanda & "' and H/L = '" & sitio & '" ""
Podrías de igual forma poner parte de tú código para ver donde estás comentiendo el error.
Saludos.
Private Sub DataCombo6_Change()
With RSbanda
.Requery
.Find "BANDA = '" & CInt(DataCombo6.Text) & "' "
variablebanda = !Id
End With
With RSancho
.Requery
If .State = 1 Then .Close
.Open " select DISTINCT (ANCHO_DE_BANDA) from Frecuencia where BANDA = " & variablebanda & ""
End With
DataCombo16.Enabled = True
Set DataCombo16.RowSource = RSancho
DataCombo16.ListField = "ANCHO_DE_BANDA"
DataCombo16.DataField = "ANCHO_DE_BANDA"
End Sub
Private Sub DataCombo16_Change()
With RSancho
.Requery
variableancho = DataCombo16.Text
If .State = 1 Then .Close
.Open "select distinct (CANAL) from Frecuencia where ANCHO_DE_BANDA = '" & variableancho & "' "
End With
DataCombo8.Enabled = True
Set DataCombo8.RowSource = RSancho
DataCombo8.ListField = "CANAL"
DataCombo8.DataField = "CANAL"
End Sub
Private Sub Combo1_Change()
With RSxancho
.Requery
variablecanal = CInt(DataCombo8.Text)
sitio = Combo1.Text
variableancho = DataCombo16.Text
If .State = 1 Then .Close
.Open "select FRECUENCIA from Frecuencia where CANAL = " & variablecanal & " and H/L = '" & sitio & "' and ANCHO_DE_BANDA = '" & variableancho & "' and BANDA = " & variablebanda & " "
Text13.Text = RSxancho.Fields("Frecuencia").Value
End With
End Sub
Open "select FRECUENCIA from Frecuencia where H/L = (select H/L from Frecuencia
where H/L= '"variablexancho"') and CANAL = ("select CANAL from Frecuencia
where CANAL = variablecanal) and ANCHO DE BANDA =
("select ANCHO_DE_BANDA from Frecuencia
where ANCHO DE BANDA = '" & variableancho& "') and BANDA =
("select BANDA From Frecuencia where BANDA = ' &variablebanda &')"
and H/L =
and (H = valor_que_quieres or L = valor_que_quieres)