Hi,

I was wondering how I can specify the default folder of a dialog box. The dialog box is a function.

Here's the code that I currently have:

Code:
   Dim strFileName As String
       Dim oDialog As Object
       Set oDialog = [Forms]![frmForm1]!xDialog.Object
       With oDialog   ' Ask for new file location.
         .DialogTitle = "Please select a new file"
         .Filter = "Access Database(*.mdb)|" & _
         "*.mdb"
        
         .FilterIndex = 1
         .ShowOpen
         ' If user responded, put selection into text box on form.
         If Len(.FileName) > 0 Then _
         [Forms]![frmForm1]![txtFileName] = .FileName
       End With

Thank you