I am trying to figure out how to have a file that is being exported via a macro to automatically use the field "Group Of Technician" from the "partsUsuageReport" to a specific location. I have been able to get the file to export and save to the correct location but have not been able to figure out how to get the file name correct. From everything I have read I will need to use VBA for this. Unfortunately I dont understand VBA at all at this point. I am working on learning it but the light hasnt clicked on yet. A lot of the code I am seeing online doesnt look anything like what I have here so I'm not sure what Im doing wrong.
Any suggestions?
'------------------------------------------------------------
' OpenReport_Click
'
'------------------------------------------------------------
Private Sub OpenReport_Click()
On Error GoTo OpenReport_Click_Err
DoCmd.OpenReport "PartsUsuageReport", acViewReport, "", "", acNormal
DoCmd.OutputTo acOutputReport, "PartsUsuageReport", "PDFFormat(*.pdf)", "T:\Brad&Bill\Tech Inventories\Parts Usauge Reports\Parts Usauge Report.pdf", False, "", , acExportQualityPrint
OpenReport_Click_Exit:
Exit Sub
OpenReport_Click_Err:
MsgBox Error$
Resume OpenReport_Click_Exit
End Sub
Any suggestions?
'------------------------------------------------------------
' OpenReport_Click
'
'------------------------------------------------------------
Private Sub OpenReport_Click()
On Error GoTo OpenReport_Click_Err
DoCmd.OpenReport "PartsUsuageReport", acViewReport, "", "", acNormal
DoCmd.OutputTo acOutputReport, "PartsUsuageReport", "PDFFormat(*.pdf)", "T:\Brad&Bill\Tech Inventories\Parts Usauge Reports\Parts Usauge Report.pdf", False, "", , acExportQualityPrint
OpenReport_Click_Exit:
Exit Sub
OpenReport_Click_Err:
MsgBox Error$
Resume OpenReport_Click_Exit
End Sub