A2000: need methods/properties for Office.Filedialog

  • Thread starter Thread starter Mr. Me
  • Start date Start date
M

Mr. Me

I have Access 2000. I need to make a form where the user choose an MDB file
to open, so he can then choose a table, and print the fields listed in that
table. I found an example which uses Office.Filedialog. The example uses a
property called SelectedItems, but I only want the user to choose one file,
not multiple.

What is the property returned when choosing a single item in the File Browse
dialog? I tried .Filename but that gave me an error.

Thanks.

Code starts like this:
Dim fDialog As Office.FileDialog
Dim filename As String

Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
 
This thing is more trouble that it's worth:
- Requires an extra reference (to the Object library).
- Does not work in the runtime.
- Does not work in older versions of Access.
- Does not work for Save As (even though it offers that option.)

For a reliable result that works in all versions and requires no extra
references, use the API call:
http://www.mvps.org/access/api/api0001.htm
 
Back
Top