I didn't think it was normal
Okay, here's code part 1:
'Get all loan records for this audit
strSQL = "SELECT * FROM Loans WHERE [auditid]= " & aid
Set rs = CurrentDb.OpenRecordset(strSQL)
' cycle thru loan records
If rs.RecordCount Then
x = 0
rs.MoveFirst
Do While Not rs.EOF
lid = rs!LoanID
ltid = rs!osiLoanTypeID
errid = aid & lid
MsgBox lid
Select Case ltid
--
Code part 2:
Case 2 'COLLATERAL MORTGAGE
strSQL = "SELECT * FROM [2zCollateralMortgage] WHERE [AuditID] = " & aid
Set rs3 = CurrentDb.OpenRecordset(strSQL)
If rs3.RecordCount Then
GoSub ApplicationA
GoSub Properties 'includes flood, insurance, appraisal, titles
GoSub TILeval
GoSub Mortgage
GoSub Rescission
GoSub HUD1
GoSub LTV
End If
---
Code part 3:
TILeval:
nTIL = nTIL + 1
If rs3!TILDiscl = 1 Or IsNull(rs3!TILDiscl) Then
strMsg = strMsg & "Truth-in-lending form is missing." & vbCrLf
nTILErr = nTILErr + 1
End if
---
Code part 4:
'Close recordsets & get next record
rs3.Close
Set rs3 = Nothing
rs.MoveNext
---
When i step into with record #59, rs3!TILDiscl =2, which the value of the last Case 2, record #50, not 1, the value that is in the table.