Hello
I am currently having the above error in my code. I have searched the forum, but there is nothing similar. When the system gets to the code in RED, the above error is displayed. Please can anybody help me.
I am currently having the above error in my code. I have searched the forum, but there is nothing similar. When the system gets to the code in RED, the above error is displayed. Please can anybody help me.
Code:
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim rstBatch As ADODB.Recordset
Dim select_query As String
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
Set rstBatch = New ADODB.Recordset
calc_lines
select_query = "SELECT sum(debit_amount) as Total FROM tbjournal_line"
[COLOR=Red]rst.Open select_query, cnn, adOpenStatic, adLockOptimistic, adCmdTable[/COLOR]
total_debits = rst![Total]
rst.Close