The answer to your question is yes you can use the common dialog box control in access. The code is virtually the same as if you were programming in Visual basic 6.0 the only difference is when you type cmnDialog. you will not get a decent list of proporties of what the dialog does.
1) To add the dialog box to the form on your toolbox press the icon "more controls" then browse down to "Microsoft common dialog box, version 6.0" and then draw it on the form.
2) Add the code
To open the dialog box you use .showopen
The file that was choosen is .filename you can also try .FileTitle
You can set the default directory using .InitDir
You can also set filters as follows using .FilterIndex
"Executables (*.exe;*.com)|*.exe;*.com|All files (*.*)|*.*"
The are hundreds of methods to copy files you have to decide what is the best one for you there is also an API that i use when saving files to a Directory it works as follows:
Paste this into a module
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias _
"SHGetPathFromIDListA" (ByVal pidl As Long, _
ByVal pszPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
"SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
As Long
Private Const BIF_RETURNONLYFSDIRS = &H1
Public Function BrowseFolder(szDialogTitle As String) As String
Dim X As Long, bi As BROWSEINFO, dwIList As Long
Dim szPath As String, wPos As Integer
With bi
.hOwner = hWndAccessApp
.lpszTitle = szDialogTitle
.ulFlags = BIF_RETURNONLYFSDIRS
End With
dwIList = SHBrowseForFolder(bi)
szPath = Space$(512)
X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)
If X Then
wPos = InStr(szPath, Chr(0))
BrowseFolder = Left$(szPath, wPos - 1)
Else
BrowseFolder = ""
End If
End Function
Then to call the directory selector use:
BrowseFolder("Copy files to"
"Copy files to" is the heading.
Hope this helps a little.
Jamie Mack