Greetings,
First time poster so I'll try to do my best.
I'm currently working with Access 2007 building a way to create PODs to clients. I have most everything laid out, one problem I can't seem to get around is naming the file the SOW #. Below is the code:
I can't seem to get the name to equal the SOW number.
The table that I'm trying to reference is "SOW bill requested data points" it is a basic table one row with a column header as SOW #. I'm not sure how to tell it name the file that data point in the column.
Any help would be appreciated.
First time poster so I'll try to do my best.
I'm currently working with Access 2007 building a way to create PODs to clients. I have most everything laid out, one problem I can't seem to get around is naming the file the SOW #. Below is the code:
Code:
Function Run_all_PODs_01()
Dim myPath As String
Dim name As Object
DoCmd.OpenQuery "Q5 SOW bill requested data points all", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested All 01", acViewNormal, acEdit
DoCmd.OpenQuery "Q loop 02", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested 2", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested 3", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested 4 all", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested 5", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested 6", acViewNormal, acEdit
DoCmd.OpenTable "SOW bill requested data points", acViewNormal
name = Table![SOW bill requested data points]![SOW #] + ".pdf"
myPath = "C:\Users\xxx\Desktop\"
DoCmd.OutputTo acOutputReport, "Report1", "PDFFormat(*.pdf)", myPath + name, False, "", , acExportQualityPrint
End Function
The table that I'm trying to reference is "SOW bill requested data points" it is a basic table one row with a column header as SOW #. I'm not sure how to tell it name the file that data point in the column.
Any help would be appreciated.