P
PC User
I have a split database and I need to call up the current path of the
back end and I'm having trouble with the code. Can someone help?
================================
Public Function CurrentBEDir() As String
Dim strBEPath As String
Dim strBEFile As String
Dim Db As DAO.Database
Set Db = CurrentDb()
strBEPath = "SELECT DISTINCT MSysObjects.Database FROM MSysObjects
" & "WHERE MSysObjects.Type=6 ;"
CurrentDb.Execute strBEPath, dbFailOnError
strBEPath= Dir(CurrentDb)
CurrentBEDir = Left$(strBEPath, Len(strBEPath) - Len(strBEFile))
End Function
================================
Thanks,
PC
back end and I'm having trouble with the code. Can someone help?
================================
Public Function CurrentBEDir() As String
Dim strBEPath As String
Dim strBEFile As String
Dim Db As DAO.Database
Set Db = CurrentDb()
strBEPath = "SELECT DISTINCT MSysObjects.Database FROM MSysObjects
" & "WHERE MSysObjects.Type=6 ;"
CurrentDb.Execute strBEPath, dbFailOnError
strBEPath= Dir(CurrentDb)
CurrentBEDir = Left$(strBEPath, Len(strBEPath) - Len(strBEFile))
End Function
================================
Thanks,
PC