Thank you for your help in this area!!
I have a report named "rptUserReport" It contains a list of usernames, file names, and file paths. This is what I'm trying to do:
1. Generate individual reports for each user in my table
2. Once report is generated, create/export to PDF and name the file based on the username field
I created a form with a command button and I managed to do this, but it bombs out OR does not yield the results i'm looking for:
Private Sub Command1_Click()
Dim rst As DAO.Recordset
Dim CustomerID As Long
Dim CustomerName As String
Set rst = CurrentDb.OpenRecordset("qryUser", dbOpenSnapshot)
Do Until .EOF
CustomerID = !Users_ID
CustomerName = !Users
DoCmd.OpenReport "rptUsers", acViewReport, , "Users_ID=" & CustomerID
Name "Users1.pdf" As "Rpt_" & CustomerName & ".pdf"
CustomerID = 0
CustomerName = ""
Set rst = Nothing
I'm not at all sure that the above is the best approach. It looked like it was working, but it wasn't. Is this possible?
Thank you in advance for your direction and assistance!