Hi guys!
I've created a query (TestQuery) in order to see all IDlead in my "TableTest", related to each ID in "PaperOut" table.

When I open the report for the "IDpaper" record 3 (from the form "PaperOut"), I need to see all the names of IDlead (1,2,5,6).
For this, I've tried the following code, but it returns only the name of the first ID (1):
Code:
Private Sub Report_Load()
If DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 1 Then
Me.Text17 = "the name of the leader 1"
ElseIf DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 2 Then
Me.Text19 = "the name of the leader 2"
ElseIf DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 3 Then
Me.Text20 = "the name of the leader 3"
ElseIf DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 4 Then
Me.Text21 = "the name of the leader 4"
ElseIf DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 5 Then
Me.Text22 = "the name of the leader 5"
ElseIf DLookup("IDlead", "TestQuery", "[IDpaper] =" & Forms("PaperOut").IDpaper) = 6 Then
Me.Text23 = "the name of the leader 6"
End If
End Sub
Any help, please?