If you are linked to the SQL table this should work:
SELECT t1.ID, t1.Label, t1.FieldNumber, GetValue(t1.ID,t1.FieldNumber) FROM Table1 AS t1 ORDER BY t1.ID
Now the UDF - in a Standard Module, not a class module (behind a form)
Public Function GetValue(myID as Long, fldNo as Integer) AS String
Dim db as Database, rs as Recordset
Set db = Currentdb
Set rs = db.Openrecordset("SELECT Field" & fldNo & " FROM Table2 WHERE ID = " & fldNo & ";", dbOpenSnapShot)
If rs.EOF OR rs.BOF Then
GetValue = "No Value"
Else
GetValue = rs.Fields("Field" & FldNo).Value
End If
Set rs = Nothing
Set db = Nothing
End Function