Results 1 to 12 of 12
  1. #1
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38

    PrintOut action

    Hey guys,

    I'm trying to create a macro that will print out 5 reports. I know how to OPEN 5 reports with a macro, with the OpenReport action, but I want to print them. The PrintOut action is not in the drop down list of usable actions in the Macro design view, though.

    Any ideas? I really did try and search this topic a lot, but with no luck. Sorry.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    when you choose the "openReport" option in the macro, on the bottom, right below where you choose the report name, the default view is "print". so unless you change that, it'll print by default.

  3. #3
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    Thanks for that. The default, oddly enough for me, was not print. It was "Report" view.

    One more question. So about 10 of the 15 reports I want to print with this macro, there is a parameter "GameNumber". This parameter is named the same and corresponds to the same field in the Games table "GameID". Is there any way I can just have the user prompted ONCE for this parameter?

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    have the macro be run from a button on a form. include a textbox on the form that will hold the parameter. Then, in the report, refer to the textbox value as the filter parameter.

  5. #5
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    Well the thing is, the report just asks for the GameNumber parameter because the query it's based on uses that parameter. So I'm confused about step 3, i.e. your last sentence.

  6. #6
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    ok so its not filtered in the form. if its a query prompt, just set the criteria field of the query design to Forms!formName!txtBoxName

  7. #7
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    Okay thank you.

    I have two problems now:

    1. I can't make this edit in the 5 queries that I use UNION in, because those queries can't be opened in Query Design View

    2. The reports print fine, but when I simply VIEW them, they look messed up.
    Only when I open the Print Form that I made, and enter the proper game number in, THEN save, and THEN open the report, does it work.

  8. #8
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    yea reports are awkward that way. they're like web pages. look different depending on how you open them. i really dont know why they do that and have moved away from access reports, so i wouldnt be much help there. go ahead and post the sql and i'll insert it in for you.

  9. #9
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    Thanks for all your help though.

    What exactly do you mean insert it in?

  10. #10
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    well you said you couldnt make that edit to 5 queries because you couldnt view them in design view. paste in the sql from sql view and i'll put in the Forms!formName!txtBoxName

  11. #11
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    Ohhh that's all you have to do? Okay then I know how to make that edit. Save you some work haha.

    Thanks very much. rep'd u

  12. #12
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    woot! i haz reps!

    glad you got it working.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. command or action " isn't available
    By laqsb in forum Access
    Replies: 3
    Last Post: 07-23-2010, 10:29 AM
  2. conditional macro action
    By frcastro in forum Programming
    Replies: 4
    Last Post: 06-27-2010, 10:59 PM
  3. No action button
    By dlewicki in forum Forms
    Replies: 6
    Last Post: 12-02-2009, 12:58 PM
  4. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 AM
  5. Replies: 1
    Last Post: 05-27-2006, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums