Sam Summers
Registered User.
- Local time
- Today, 14:49
- Joined
- Sep 17, 2001
- Messages
- 939
Hi guys,
I have taken this code from a previous post of mine but it fails on the second line - Dim fd As FileDialog and comes up with the error message "user defined type not defined". Thought i had this but its got me with my limited abilities.
Thank you in advance
I have taken this code from a previous post of mine but it fails on the second line - Dim fd As FileDialog and comes up with the error message "user defined type not defined". Thought i had this but its got me with my limited abilities.
Thank you in advance
Code:
Dim MyFileName As String
Dim fd As FileDialog
Dim strFolder As String
Me.JobNo.SetFocus
MyFileName = ("SIE-RA-00" & strFileNo & "-21" & " Main Section") & ".pdf"
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
If fd.Show = -1 Then
strFolder = fd.SelectedItems.Item(1)
Else
Exit Sub
End If
DoCmd.OutputTo acOutputReport, "MainBody", acFormatPDF, strFolder & MyFileName, False
Set fd = Nothing