I am trying to run the following code in Access 2000. When I do, I
get a "Compile Error: Variable Not Defined" and the debug
highlights, "msoFileDialogFilePicker". Below is the code I am
trying to use, which was taken out of the Northwind Database example
in Access 2002. If I can't make this code work in 2000, is there
any other way to do the same thing, but in a different way?
' Displays the Office File Open dialog to choose a file name
' for the current employee record. If the user selects a file
' display it in the image control.
Dim fileName As String
Dim result As Integer
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.Filters.Add "Bitmaps", "*.bmp"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path
result = .Show
If (result <> 0) Then
fileName = Trim(.SelectedItems.Item(1))
Me![ImagePath].Visible = True
Me![ImagePath].Text = fileName
Me![ImagePath].Visible = False