Good Day All,
Can someone please vet the following query, as it is triggering an error message although it seems correctly written.
HTML Code:
sqlStrg = "SELECT [Cash posting Main Table].*, [Cash posting Sub Table].*" _
& "FROM [Cash posting Main Table] LEFT JOIN [Cash posting Sub Table] ON [Cash posting Main Table].MainPostingID = [Cash posting Sub Table].MainPostingID " _
& "WHERE ((([Cash posting Main Table].MainPostingID)=23));"
For i = 1 To NumOfRows
ACName = Nz(rst.Fields("Description"), "")
Debit = rst.Fields("Debit")
rst.MoveNext
Next i
The first problem is that the NumOfRows returns a value of 1. This is incorrect when checked otherwise.
Second, the error message states "Item not found in the Collection"
These field names are verified.