JamesLeeNeal
08-29-2012, 07:03 PM
I am attempting to create a SAVE AS dialox where users can save the active database to My Documents or to a location they choose.
Getting a "run-time error 438 - object doesn't support this property or method."
Any direction would be appreciated. Thanks
Private Sub btnSaveAs_Click()
Dim dialog As FileDialog
Set dialog = Application.FileDialog(msoFileDialogSaveAs)
Call dialog.Filters.Add("MPA03 Files", "*.mdb")
dialog.Title = "Save As File Name"
dialog.Show
' See if the user canceled.
If file_name = False Then Exit Sub
' Save the file with the new name.
If LCase$(right$(file_name, 4)) <> ".mdb" Then
file_name = file_name & ".mdb"
End If
FileCopy CurrentDb.Name, file_name
End Sub
Getting a "run-time error 438 - object doesn't support this property or method."
Any direction would be appreciated. Thanks
Private Sub btnSaveAs_Click()
Dim dialog As FileDialog
Set dialog = Application.FileDialog(msoFileDialogSaveAs)
Call dialog.Filters.Add("MPA03 Files", "*.mdb")
dialog.Title = "Save As File Name"
dialog.Show
' See if the user canceled.
If file_name = False Then Exit Sub
' Save the file with the new name.
If LCase$(right$(file_name, 4)) <> ".mdb" Then
file_name = file_name & ".mdb"
End If
FileCopy CurrentDb.Name, file_name
End Sub