Access/VBA Library


This Private function returns the full path of the INI-file of the current project.


Return value

String : Path to the INI-file.

Private Function INI_Filename() As String

    Static filename As String
    If IsEmptyVar(filename) Then
        filename = GetApplicationFolder() & "\" & GetWord(GetApplicationTitle(), 1) & ".ini"
    End If
    INI_Filename = filename
End Function


  • The file name is determined once and stored as a static variable. If you set the AppTitle property after this function is called, the name of the INI-file will not change.
  • When the AppTitle property is set, the first word of this property is the name of the application. I am used to set this property as follows: V. I do not want the version number in the name of the INI-file.

See also

  • GetApplicationFolder
  • GetApplicationTitle
  • GetWord