I didnt realize that the Immediate window is limited to 200 lines. I run a report that will have 3k lines so I need that info to be transferred to a table. I am very new to Access VBA. Any ideas? Here's my code:
Public Function NTInfo()
Dim oUser
Dim rstRecords As DAO.Recordset
Dim db As Database
Set db = CurrentDb()
Set rstRecords = db.OpenRecordset("qselP2P_WEEKLY", dbOpenDynaset)
rstRecords.MoveFirst
Do While Not rstRecords.EOF
Set oUser = ADSearch.GetManagerInfo(CStr(rstRecords.Fields("UserName").Value))
Debug.Print oUser.LastName, ";", oUser.Manager, ";", oUser.Department
On Error GoTo KeepGoing
KeepGoing:
If Err.Description <> "" Then
Debug.Print "InvalidNTID"
End If
rstRecords.MoveNext
Loop
Bookmarks