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:
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)|" & _
.FilterIndex = 1
' If user responded, put selection into text box on form.
If Len(.FileName) > 0 Then _
[Forms]![frmForm1]![txtFileName] = .FileName