HI,
I’ve used the following code to show the filepath on my reports.
Option Compare Database ‘Use the following to return the path of the current db
Option Explicit
‘
Function CurrentDBDir() As String
Dim strDBPath As String
Dim strDBFile As String
strDBPath = CurrentDb.Name
strDBFile = Dir(strDBPath)
CurrentDBDir = Left(strDBPath, Len(strDBPath) – Len(strDBFile)) & strDBFile
End Function
On my own database is works fine and show the full path as R:databaseresponsibilities.mbd.
I tried to set up a procedures document, so that others in the department would know how to insert the filepath (company requirement). I used an old database on the same server (different drive) and was taking screen shots of each step. However when I got to the end, the file path appears truncated on the report
M:CommonDEPARTM~1DATABA~1Vendors.mdb
I tried removing everything else from the footer, increasing the size of the text box, but nothing seems to work so that the full filepath will display. It was suggested to me that is was because the older database exceeds the 8 character limit. If that was the case, then why would my database show the full database name?
Can anyone suggest what the problem might be?
Thanks.