I followed the intelesence as a guide, still can not get the report to export and using file save as with the report name and content of the form auto populated
Dim sFolder As String
Dim fd As FileDialog
Dim booResult As Boolean
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.AllowMultiSelect = False
fd.title = "Select folder"
While booResult = False
If fd.Show = True Then
'folder path was selected
booResult = True
sFolder = fd.SelectedItems(1)
DoCmd.OutputTo acReport, "DAW Sheet - Comm Approve", acFormatPDF, _
sFolder & "\DAW Sheet - Comm Approve - Registration - " & Forms![CS Raised - Mail]![RegCBO] & ".pdf"
End If
Wend
Yes, this seems to be more complicated than i thought it would be
I default back to below code until I managed to get it working with file save as and controls from the form
DoCmd.OutputTo acReport, ("DAW Sheet - Comm Approve"), acFormatPDF
Yes, this seems to be more complicated than i thought it would be
I default back to below code until I managed to get it working with file save as and controls from the form
Well at least name it as you want and put in a folder that suits everyone, and just issue a message "Report saved as " & "DAW Sheet - Comm Approve" & " in folder " & strFolder
If you are going to have report names like that, I'd also use a variable for the report name strReport ?
That way if you ever change it, you change it on one place only?
Yes, this seems to be more complicated than i thought it would be
I default back to below code until I managed to get it working with file save as and controls from the form
If all I want for the user to do is decide where to save a file, I would use a folder picker instead. If you can post a sample db, we can help you with that.