The following code works in 32-bit & 64-bit Access
Code:
Set options for the dialog box. Dim F As FileDialog
Set F = Application.FileDialog(msoFileDialogFilePicker)
F.title = "Locate the JSON file folder and click on 'Open' to select it" 'modify as appropriate
' Clear out the current filters, and add our own
F.Filters.Clear
F.Filters.Add "JSON files", "*.json" 'modify as appropriate
' Set the start folder. Open in default file folder if blank
F.InitialFileName = Nz(Application.CurrentProject.Path & "\Files\", "C:\") 'modify as appropriate
' Call the Open dialog procedure.
F.Show
' Return the path and file name.
strFilePath = F.SelectedItems(1)
Me.FileName = Mid(strFilePath, InStrRev(strFilePath, "\") + 1)
strFile = Me.FileName
Me.FolderPath = Left(strFilePath, Len(strFilePath) - Len(strFile) - 1)
strFilename = Left(strFile, InStr(strFile, ".") - 1)
However that doesn't solve your issue of filtering for an individual file
I don't believe its possible to do so using a File...Open dialog
By definition it filters for the file type you specify and shows all the files of that type
If you specify a nonsense file type, you will get no results
However I don't see the point of doing this anyway.
If you know the file that you want to open, then scrap the file open dialog box
Just open the file direct from the button click event