Hi guys
A really bizarre issue I haven't walked into before. Let me try and explain;
I am having issues with this small part of code here;
Now I have a looping procedure that this sits in which calls a lot of other procedures and all works perfectly fine, apart from the procedure stalling on this part when the recordset it's trying to open has 0 records. I am absolutely stumped on this one and haven't encountered it before.
Anyone encountered this before or can anyone shed some light on my problem? Very very confused!!
A really bizarre issue I haven't walked into before. Let me try and explain;
I am having issues with this small part of code here;
Code:
Set rst = CurrentDb.OpenRecordset(sSql1, dbOpenSnapshot)
With rst
If .RecordCount > 0 Then
i = i + 1
.MoveFirst
FTA = Nz(!Accounts, 0): FTAT = ![avgofest time]: FTB = Nz(!sumofBal, 0): PS = !sumofPay
.Close
Set rst = Nothing
Else
rst.Close
Set rst = Nothing
Jumpout = True
DoEvents
Exit Function
End If
End With
Now I have a looping procedure that this sits in which calls a lot of other procedures and all works perfectly fine, apart from the procedure stalling on this part when the recordset it's trying to open has 0 records. I am absolutely stumped on this one and haven't encountered it before.
Anyone encountered this before or can anyone shed some light on my problem? Very very confused!!