I am trying to use code copied from the Northwind database to select a file.
The code is:
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.Filters.Add "Bitmaps", "*.bmp"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path
result = .Show
................
When I try to run it, I get the message, "Methed - 'File Dialog' of object'_Application Failed". I am using access 2003. One of the threads (thread705-1099796) suggested adding a reference to "Microsoft Office x.01". I can't find that in the reference list. Any help would be greatly appreciated.
Thanks, Bill
The code is:
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.Filters.Add "Bitmaps", "*.bmp"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path
result = .Show
................
When I try to run it, I get the message, "Methed - 'File Dialog' of object'_Application Failed". I am using access 2003. One of the threads (thread705-1099796) suggested adding a reference to "Microsoft Office x.01". I can't find that in the reference list. Any help would be greatly appreciated.
Thanks, Bill