Forma veya modüle
Public Function GetLinkedDBName(TableName As String) As String
Dim strReturn As String
On Error Resume Next
strReturn = CurrentDb.TableDefs(TableName).Connect
GetLinkedDBName = strReturn
End Function
Public Function FileNameFromPath(strFullPath As String) As String
FileNameFromPath = Right(strFullPath, Len(strFullPath) - InStrRev(strFullPath, "\"))
End Function
kodlarını ekle, formun açıldığında olayına da
Me.VERITABANI = FileNameFromPath(GetLinkedDBName("TBLOGRENCI"))
kodu ekle.