I was working on the below code and having an issue with it as I want to have the code cycle through all offices and pull all the names by department for example Admin it will show for example all 3 then go to IT and show all 4 names. Can anyone assist me on this thanks.
Code:
Dim strOffice As String
Dim Titles As String
If Not rs2.EOF Then
Do
Titles = Titles & rs2!Office & " " & rs2![Name] & " " & vbCr
rs2.MoveNext
Loop Until rs2.EOF
MsgBox Titles
End If