By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,969 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,969 IT Pros & Developers. It's quick & easy.

Common Dialog Control in Access 2003 - Where it is?

P: 52
I've been looking for the Common Dialog Control in Access 2003 but I couldn't find it. Usually you can find it in the Insert - Active X controls menu. Does Access 2003 doesn't use Common Dialog Control anymore?
Sep 27 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,418

I invoke the Open or Save CMD object but using code!

Sth like this:

Dim fd As FileDialog

'Create a FileDialog object as a File Picker dialog box.

Set fd = Application.FileDialog(msoFileDialogFilePicker)

'Declare a variable to contain the path
'of each selected item. Even though the path is a String,
'the variable must be a Variant because For Each...Next
'routines only work with Variants and Objects.
Dim vrtSelectedItem As Variant

'Use a With...End With block to reference the FileDialog object.
With fd

'Set the initial view to the details view.
.InitialView = msoFileDialogViewDetails

'Use the Show method to display the File Picker dialog box and return the user's action.
'If the user presses the action button...
If .Show = -1 Then

'Step through each string in the FileDialogSelectedItems collection.
For Each vrtSelectedItem In .SelectedItems

'vrtSelectedItem is a String that contains the path of each selected item.
'You can use any file I/O functions that you want to work with this path.
'This example simply displays the path in a message box.
'MsgBox "Selected item's path: " & vrtSelectedItem
Print #1, vrtSelectedItem
Next vrtSelectedItem
'If the user presses Cancel...
End If
End With

'Set the object variable to Nothing.
Set fd = Nothing
Sep 27 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.