Dialog Box in Microsoft Access (Find File)
'(c) 2002 João Tito Lívio
'This code can only be use as a part of an Application and could not be sell
'To REQUEST a full functional sample please > Click
1. Insert a DialogBox ActiveX in your Form.
In Design View go INSERT - ActiveX CONTROL

2. Rename the control to "cdlg"
3. Paste the Code to a CLICK event of a Commad Button
CODE
Dim strCaminho As String
With Me.cdlg
'Initial Directory
.InitDir = "C:\"
'Dialog Title
.DialogTitle = "Localizar Arquivo"
'Filter File Types
.Filter = "Arquivos(*.txt)|*.txt|All Files (*.*)|*.*"
.ShowOpen
'Return File and Path to a Variable
strCaminho = .FileName
End With
MsgBox "Path: " & strCaminho
SAMPLE
