KeythStone
New Member
- Joined
- Mar 30, 2011
- Messages
- 36
Hey all,
I would like to know if I could use a recordset in a table to fill in a parameter for a query. If so I would like to use Do Until .EOF. MoveNext.
I would also like to be able to use the recordset for part of a filename, 'ReportName'
Function test()
On Error GoTo test_Err
Set db = CurrentDb()
Set ReportName = db.OpenRecordset("ReportList", dbOpenDynaset)
Do Until ReportName.EOF
Dim StrClient As String
StrClient = "F:\OP_CS\Client Reporting\ReportName\AIM\" & Format(Date, "yyyymmdd") & ".pdf"
DoCmd.OpenReport "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)", acViewPreview, "", "", acNormal
DoCmd.OutputTo acOutputReport, "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)", "PDFFormat(*.pdf)", StrDocClient, False, "", 0, acExportQualityPrint
DoCmd.Close acReport, "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)"
Any help is much appreciated.
Stay Smooth,
KeythStone
I would like to know if I could use a recordset in a table to fill in a parameter for a query. If so I would like to use Do Until .EOF. MoveNext.
I would also like to be able to use the recordset for part of a filename, 'ReportName'
Function test()
On Error GoTo test_Err
Set db = CurrentDb()
Set ReportName = db.OpenRecordset("ReportList", dbOpenDynaset)
Do Until ReportName.EOF
Dim StrClient As String
StrClient = "F:\OP_CS\Client Reporting\ReportName\AIM\" & Format(Date, "yyyymmdd") & ".pdf"
DoCmd.OpenReport "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)", acViewPreview, "", "", acNormal
DoCmd.OutputTo acOutputReport, "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)", "PDFFormat(*.pdf)", StrDocClient, False, "", 0, acExportQualityPrint
DoCmd.Close acReport, "AIM (Assignment,DB): ALL OPEN (AIM by DB: ALL OPEN)"
Any help is much appreciated.
Stay Smooth,
KeythStone