May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
Private Sub Command31_Click() DoCmd.RunCommand acCmdSaveRecord Forms!Form2.SetFocus Dim oApp As Object Dim oEmail As Outlook.MailItem Dim fileName As String Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("SELECT DISTINCT [Account], [InvoiceNum], [EmailAddress], [Company] FROM [ContactTotalsNoEmail] WHERE (((Contracts.SelectedPrint)=True)) ORDER BY [Account];", dbOpenSnapshot) Do While Not rst.EOF strRptFilter = "[InvoiceNum] = " & Chr(34) & rst![InvoiceNum] & Chr(34) fileName = "C:\Scripts" & "\" & rst![Account] & " - " & rst![InvoiceNum] & ".pdf" DoCmd.OutputTo acOutputReport, "InvTotalNoEmail", acFormatPDF, fileName DoEvents rst.MoveNext Loop rst.Close Set rst = Nothing Forms!Form2.Requery End Sub
rst2.Edit rst2!Print = Yes rst2.Update rst2.MoveNext
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|find and replace in column A across 75 csv books||8||29|
|Add a record to a table when enter value in a combobox||7||31|
|Excel Auto-Complete lines||4||32|
|how to get hundreds part from the number||1||29|
Join the community of 500,000 technology professionals and ask your questions.