L
Laurel
I'm reposting this from another message thread. I think it was probably too
old for anyone to notice the new question. And it's basically a new issue
anyway.
When I do this, I get an error at the .execute statement, "Object variable
or With block variable not set."
I've had problems in the past trying to Dim the database. I have referenced
DA0 3.6. I have not referenced any ADO libraries. (Although I've played
around with that, referencing both.. in different orders. But not for this
problem here). Finally I just gave up and used "CurrentDB." But apparently
I can't get away with that and still use RecordsAffected
Here is my code, cut and pasted (ls_SQL is legit... defined elsewhere)
Dim dbCurr As DAO.Database
With dbCurr
.Execute "Select * from tlbScores"
li_safety = .RecordsAffected
End With
old for anyone to notice the new question. And it's basically a new issue
anyway.
When I do this, I get an error at the .execute statement, "Object variable
or With block variable not set."
I've had problems in the past trying to Dim the database. I have referenced
DA0 3.6. I have not referenced any ADO libraries. (Although I've played
around with that, referencing both.. in different orders. But not for this
problem here). Finally I just gave up and used "CurrentDB." But apparently
I can't get away with that and still use RecordsAffected
Here is my code, cut and pasted (ls_SQL is legit... defined elsewhere)
Dim dbCurr As DAO.Database
With dbCurr
.Execute "Select * from tlbScores"
li_safety = .RecordsAffected
End With