Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Sep 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    OnClick Create New Report based on Crosstab Query

    Hi
    I have a crosstab Query (Names as rows, Exams as columns and Scores as values) and I applied a "Form!Classes!ClassID" criteria so Query differs each time I choose a class.
    Now I want to have a button which onClick creates an AutoReport, saves it and shows in Print mode based of course on my Query
    It would be nice to have it with fixed sized of fields.
    Thanks in Advance, Regards

  2. #2
    New Lounger
    Join Date
    Sep 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I have found AutoReport code:

    Private Sub Command3_Click()
    DoCmd.OpenQuery "Exam Scores"
    DoCmd.RunCommand acCmdNewObjectAutoReport
    End Sub

    So question is how to control it in vba(save it, size, use landscape paper and etc)?
    Last edited by umarus; 2012-10-10 at 20:50.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •