Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet view.
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
If Forms(strFormName).CurrentView <> 0 Then
IsLoaded = True
End If
End If
End Function
Function DatabaseNameAndPath() As String
Dim db As Object
Set db = CurrentDb()
DatabaseNameAndPath = CurrentDb.Name
End Function
Function DatabaseMappedPath() As String
' Returns all to the left of the last '\'
' Ie \\Server\Path\ from \\Server\Path\Name.mdb
DatabaseMappedPath = Left(DatabaseNameAndPath, InStrRev(DatabaseNameAndPath, "\"))
End Function
Public Function FileExists(strServerPathFileName As String) As Boolean
Dim strServerPath As String
Dim strFile As String
strServerPath = Left(strServerPathFileName, InStrRev(strServerPathFileName, "\") - 1)
strFile = Mid(strServerPathFileName, Len(strServerPath) + 2)
With Application.FileSearch
.NewSearch
.LookIn = strServerPath
.SearchSubFolders = False
.FileName = strFile
.MatchTextExactly = True
.FileType = 1 ' msoFileTypeAllFiles
' If .Execute() = 0 Then ' File does not exist
' FileExists = False
' Else
' FileExists = True
' End If
FileExists = .Execute
End With
End Function