G
Guest
Why isn't this code working:
Dim con_ls As Object
Dim rs_ls As Object
Set con_ls = Application.CurrentProject.Connection
Set rs_ls = CreateObject("ADODB.Recordset")
rs_ls.Open "Select firmen_name from t_firmen where " & _
" firmen_grenze_unten < = " & ls_nummer & " and " & _
" firmen_grenze_oben > = " & ls_nummer & " )"
Always get an error message:
"This coonnection can not be used. The connection is closed or not valid"
That is a somehow rough translation from german.
jokobe
Dim con_ls As Object
Dim rs_ls As Object
Set con_ls = Application.CurrentProject.Connection
Set rs_ls = CreateObject("ADODB.Recordset")
rs_ls.Open "Select firmen_name from t_firmen where " & _
" firmen_grenze_unten < = " & ls_nummer & " and " & _
" firmen_grenze_oben > = " & ls_nummer & " )"
Always get an error message:
"This coonnection can not be used. The connection is closed or not valid"
That is a somehow rough translation from german.
jokobe