Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    May 2002
    Location
    Mississippi
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing a Report Problems (2000 SR1)

    I am working on a report that prints from a form. Basically you select a name from a drop down list and it prints up to 4 seperate reports based on that selection. I have put a option button on the form that when checked and you select a person's name out of a drop down list the 4th report prints. If the Option button is not check it should not print the 4th report (Utilizing a macro to print the reports). Problem is I can't get it to work. The report still prints the 4th page (either blank page or with data depending on how I have set up expressions.)

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Printing a Report Problems (2000 SR1)

    Without seeing how you call the report, it isn't possible to know what the problem might be. I would suspect that the macro is simply printing 4 reports and you have no conditional check for the value of the option group.
    Charlotte

  3. #3
    New Lounger
    Join Date
    May 2002
    Location
    Mississippi
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing a Report Problems (2000 SR1)

    This is the where condition of my macro to print the report
    [Forms]![Form PQR Officer Print]![Option19]= True And [Forms]![Form PQR Officer Print]![list]

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Printing a Report Problems (2000 SR1)

    The where condition of your *macro*? Are you talking about a macro or code?

    How are your options set up? You don't normally test for an option button value, you test for the value of the option group. You'll have to explain more about the layout of your form.
    Charlotte

  5. #5
    New Lounger
    Join Date
    May 2002
    Location
    Mississippi
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing a Report Problems (2000 SR1)

    I went and changed this to an Option Group, set the values to 1 print 2 don't print.

    I have created a macro that runs on clicking a persons name that prints up to 4 reports. The 4th report should only print if the option group is set to print (1).
    =[Forms]![Form PQR Officer Print]![Frame21]=1

    I extractred out the data in to a temp file and attached to this so you can see what I am talking about. The Macro that has the test condition is Open Officer PQR Print, the last report to open is the one that I am having the problem with. Thanks

    If I select 1 (print) on the form and select a name the report opens and runs, if I select 2 it opens with a blank page. (Would it help
    Attached Files Attached Files

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Printing a Report Problems (2000 SR1)

    I have had a look at your form and you are printing reports from all over the place. In the AfterUpdate of List14 and List18 and List12 as well as OnDoubleClick of the all three mentioned controls. The problem with putting any printing etc behind an AfterUpdate is that whenever the data in the control changes the AfterUpdate is immediately fired leaving you with no opportunity to change your selection before the report (s) are initiated.

    What I normally do to print reports is to provide a Preview or Print (or both) button and I tend to print the report(s) in the code in the Click event of that button.

    I tend to do my printing in code (behind that button) as you have far more flexibility and control from VBA code than you have with macros (you have no error control with macros).

    I have included a changed database in return, as you will see I do not use macros. It is entirely untested, it would have been a lot easier if you had posted your database (with the sensitive data deleted) but I hope you get the idea.
    HTH
    Pat
    Attached Files Attached Files

  7. #7
    New Lounger
    Join Date
    May 2002
    Location
    Mississippi
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing a Report Problems (2000 SR1)

    Sorry it took so long to get back. Been out of office. Thanks for the Offer, Just got a call from the group I am writing this for (Personnel Branch) and they dropped the requirement to print the 4th Report Seperatly.

    Thanks for your help.

    Randy Breland, SFC, United States Army

Posting Permissions

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