I have a module that returns a value that I need to place in a sql table. I'm used to using access and sqlpassthrough queries. When I try to execute the sql statement I get (run time error 91 - object variable or with block variable not set). I'm not sure how to set the connections. Here's a portion of the code I have:
Dim db As Database
Dim sql As String
intcnt = 0
Set db = CurrentDb()
sql = "Insert into fridays_in_month values (" & intcnt & ""
db.Execute sql
Thanks in advance for replies.
Dim db As Database
Dim sql As String
intcnt = 0
Set db = CurrentDb()
sql = "Insert into fridays_in_month values (" & intcnt & ""
db.Execute sql
Thanks in advance for replies.