Function Yanyana(Deger As String) As String
Dim rs As DAO.Recordset
Dim db As Database
Dim strSQL As String
Dim D1 As String
Set db = CurrentDb()
'strSQL = "SELECT TEL.TEL_NO, TEL.TEL_ID FROM TEL GROUP BY TEL.TEL_NO, TEL.TEL_ID ORDER BY TEL.TEL_ID;"
strSQL = "SELECT MBPN, ILAC_ADI FROM ILAC GROUP BY MBPN, ILAC_ADI ORDER BY MBPN;"
Set rs = db.OpenRecordset(strSQL)
rs.MoveFirst
D1 = ""
Do Until rs.EOF
If rs!MBPN = Deger Then D1 = D1 & rs!MBPN & "-"
rs.MoveNext
Loop
90
If Len(D1) = 0 Then Yanyana = "": GoTo 110
Yanyana = Left(D1, Len(D1) - 1)
110
End Function