why this variable definition are failing ?
If Combo1.Text = wd1 Then
dbCampo = "Secção"
End If
Set rs = db.OpenRecordset("SELECT * FROM " & dbTabela & ""
Do While Not rs.EOF
'record = "" & rs!Fields("dbCampo"
---> This gives error
'record = "" & rs!Secção '-------------> This works fine
If record <> "" Then
List1.AddItem record
End If
rs.MoveNext
Loop
rs.Close
Thanks
Fernando
If Combo1.Text = wd1 Then
dbCampo = "Secção"
End If
Set rs = db.OpenRecordset("SELECT * FROM " & dbTabela & ""
Do While Not rs.EOF
'record = "" & rs!Fields("dbCampo"
'record = "" & rs!Secção '-------------> This works fine
If record <> "" Then
List1.AddItem record
End If
rs.MoveNext
Loop
rs.Close
Thanks
Fernando