P
pubdude2003 via AccessMonster.com
wow, been a busy weekend for me, another question...
I am trying to set up a simple loop through a query and I am getting the
famous 'Object variable or With block variable not set' error, it appears to
be the FileName field, any help would be appreciated. There is definitely
data in the query
Dim ID As Integer
Dim FileName As String
Dim SQLStmt As String
Dim rs As Recordset
SQLStmt = "SELECT ID, FileName"
SQLStmt = SQLStmt & " FROM Query1"
Set rs = db.OpenRecordset(SQLStmt)
Do Until rs.EOF = True
OpenAcrobat
PrintPDFDoc2 rs!FileName
rs.MoveNext
Loop
I am trying to set up a simple loop through a query and I am getting the
famous 'Object variable or With block variable not set' error, it appears to
be the FileName field, any help would be appreciated. There is definitely
data in the query
Dim ID As Integer
Dim FileName As String
Dim SQLStmt As String
Dim rs As Recordset
SQLStmt = "SELECT ID, FileName"
SQLStmt = SQLStmt & " FROM Query1"
Set rs = db.OpenRecordset(SQLStmt)
Do Until rs.EOF = True
OpenAcrobat
PrintPDFDoc2 rs!FileName
rs.MoveNext
Loop