Search results

  1. S

    Object or class does not support the set of events

    I know this is an old thread but I can report the problem still occurs with a clash between Access versions. I had a client with Office Professional 2003 and Access 2010 installed alongside for some time. This error started to occur (presumably after some MS update) and was solved by...
  2. S

    Stored proc datasource with input parameters requires recordsource qualifier

    I have been using MS Access ADP front end to an SQL Server 2012 database in several applications using hundreds of forms and reports over nearly ten years. However, in almost all cases I set the datasource at design time or by using vba dependent on user selection/events. I have almost never...
  3. S

    changing grouping and sorting using code

    You can also turn a group off, rather than change it to group on another field, by making the groupheader.visible false However, unless you set the grouplevel(n).controlsource to a constant, the hidden group will still control the order of the records Private Sub Report_Open(Cancel As Integer)...
  4. S

    Access 2010 PDF and Email a Report Using VBA Code

    Finally, finally You can use DoCmd.OutputTo instead of DoCmd.SendObject Why not offer a combo with a list of possible formats: Create a combobox with default value "Preview" and RowSource: "Preview";"HTML (*.html)";"PDF Format (*.pdf)";"Rich Text Format (*.rtf)";"Microsoft Excel (*.xls)"...
  5. S

    Access 2010 PDF and Email a Report Using VBA Code

    Just to finally round this out... If you want to send the report straight to email: On Error Resume Next DoCmd.SendObject acSendReport, strReport, acFormatPDF, , , , , "Report Attached" On Error GoTo 0 Why use the On Error ? Well, the email appears ready for any editing in a modal window...
  6. S

    Access 2010 PDF and Email a Report Using VBA Code

    Hi Sting You specified a folder but without an explicit drive or root, so Access assumed the path was relative to the default path, in this case My Documents. Just specify any valid full path: SetDirectoryPDF = "P:\Project xxx\reports\AtoADBPrints\" etc PS I haven't actually tried this but...
  7. S

    Access 2010 PDF and Email a Report Using VBA Code

    Why not just use the Docmd.SendObject command: DoCmd.SendObject acSendReport, [name of report], acFormatPDF, "recipient@company.com",[cc email(s)],[bcc email(s)], [Message Subject], [MessageBody], True Works a treat! I am planning to add it to all my report dialogs. Steve
Top Bottom