• WSrhconley

    WSrhconley

    @wsrhconley

    Viewing 15 replies - 211 through 225 (of 254 total)
    Author
    Replies
    • in reply to: Who’s using the Database? (A2K SR2) #550170

      Thanks, Wendell.

    • in reply to: Printing Reports (A2K SR2) #550169

      Thanks again, Rory. Your code appears to be working. I’m always amazed how it takes a week or so before unexpected behavior (bugs) start to show up.

    • in reply to: Printing Reports (A2K SR2) #550165

      Rory,

      I don’t have a Report Header in my report, only a Page Header that prints on every page. Accordingly, I placed your code in the Page Header section. I tried revising your code somewhat by placing the following in the Page Header print event:

      Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
      If Me.Page = 1 Then
      blnPrinted = Not blnPrinted
      ElseIf Me.Page = 2 Then
      blnPrinted = blnPrinted
      ElseIf Me.Page = 3 Then
      blnPrinted = Not blnPrinted
      ElseIf Me.Page = 4 Then
      blnPrinted = blnPrinted
      End If
      End Sub

      I ran my 2 page report and it appears to be functioning properly. Of course, the code, as I revised it, accommodates reports of up to 4 pages in length, but does it make sense that this should work?

    • in reply to: Printing Reports (A2K SR2) #550161

      Rory,

      Your code works perfectly for a one page report. However, when my purchase order gets lengthy, and spans multiple pages, I run into trouble. I know I didn’t mention that multiple page reports were a possibility. In my case, if the user views the additional report pages in Print Preview, the 3 additional pages print upon exiting Print Preview without printing the main report. There are also some other wierd, logic-related printing problems, too. I haven’t had time to digest the code, but I’m sure it has to do with even and odd pages, the firing of the print command, and the use of Boolean logic to correct that. Is there a way to accommodate the possibility of multiple page main reports and the need to have the 3 additional reports print ONLY if the user prints the main report, regardless of length? Thank you for your help.

    • in reply to: Memo Fields (A2K SR2) #550029

      Thank you, sir.

    • in reply to: Memo Fields (A2K SR2) #549889

      Thanks, Mark. That took care of it. Any idea of the rationale behind this behavior?

    • in reply to: Printing Reports (A2K SR2) #549447

      Thanks again, Rory. You know, you really should consider doing this for a living!

    • in reply to: Printing Reports (A2K SR2) #549443

      Rory,

      Many thanks! Again, you solved one of my problems. Thank you.

      A quick question…I can follow the logic of the Report Open and Report Close events. What does the ReportHeader_Print code do?

    • in reply to: Printing Reports (A2K SR2) #549430

      Rory,

      I added your code to my main report, placing the first 3 lines in the Declarations section. The report does not run, however, and I am presented with the following error message:

      The expression On Open you entered as the event property setting produced the following error:
      Procedure declaration does not match description of event or procedure having the same name.
      * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Property].
      * There may have been an error evaluating the function, event, or macro.

      Any ideas?

    • in reply to: Printing Reports (A2K SR2) #549227

      Morning, Gary. The user prints the main report (Purchase Order) by going to File/Print or by pressing the Print command button on the Access command bar. I have not created a custom print button just for the PO report.

    • in reply to: Printing Reports (A2K SR2) #549224

      The following code does the job for me:

      Private Sub Report_Close()
      DoCmd.OpenReport “rptPOTANDCPG1”
      DoCmd.OpenReport “rptPOTANDCPG2”
      DoCmd.OpenReport “rptPOTANDCPG3”
      End Sub

      Now, I’d like these 3 additional reports to print ONLY if the user PRINTS the main report. I tried adding this code to the On Print events in the main report Detail and Footer sections…the 3 additional reports will print before the main report is displayed in Print Preview, but the main report will not print (it will not queue to the printer). If I add this code to the On Close event of the main report, the main report and the 3 additional reports will print, but this results in the 3 additional reports ALWAYS printing, even if the user does not print the main report. How can I get the 3 additional reports to print ONLY if the use prints the main report? Thanks for the help.

    • in reply to: Date in a Report Header (A2K SR2) #548091

      Thanks, Charlotte. Your solution took care of it.

    • in reply to: Date in a Report Header (A2K SR2) #548083

      Charlotte,

      Forgive my ignorance, but can you provide additional detail? The query now returns ‘X’ number of records, each with a date equal to or less than the parameter value. Where would I create the expression?

    • in reply to: Counting Records in a Report (A2K SR2) #547640

      Thomas,

      Thank you. Your method worked perfectly. Thanks for taking the time to come up with this solution.

    • in reply to: Counting Records in a Report (A2K SR2) #547461

      Thomas,

      The report already has a Purchase Order Group Header section (for the PO information) and a Detail section (for the line items). When I place the counter in the PO Group Footer section, the count control simply returns the number of line items associated with each purchase order.

    Viewing 15 replies - 211 through 225 (of 254 total)