T
Tiziana Venturini
I am trying to open a recordset using this code.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("select
Cod_Via,Num_Civ,Bis,Int,Let,Num_second,sc,num_zona FROM Dettagli
WHERE (([sc]='" & Me![cboSc] & "') OR ('" & Me![cboSc] & "' is null))
AND (([Num_Zona]='" & Me![cboZona] & "') OR ('" & Me![cboZona] & "' is
null))
AND (([Cod_Via]='" & Me![cboCod] & "') OR ('" & Me![cboCod] & "' is
null))")
but the OR statement don't work!!!!!
sc, num_zona and cod_via are TEXT.
Where is the error?
Thank in advanced
Tiziana Venturini
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("select
Cod_Via,Num_Civ,Bis,Int,Let,Num_second,sc,num_zona FROM Dettagli
WHERE (([sc]='" & Me![cboSc] & "') OR ('" & Me![cboSc] & "' is null))
AND (([Num_Zona]='" & Me![cboZona] & "') OR ('" & Me![cboZona] & "' is
null))
AND (([Cod_Via]='" & Me![cboCod] & "') OR ('" & Me![cboCod] & "' is
null))")
but the OR statement don't work!!!!!
sc, num_zona and cod_via are TEXT.
Where is the error?
Thank in advanced
Tiziana Venturini