Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2007
    Thanked 0 Times in 0 Posts

    Printing and email from the subform (access 2003)

    Hans the want to email and print a report based on the EIRID on the subform. I tried a few things but was unsuccessful. Can you take a look? Thank so much again..

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Printing and email from the subform (access 2003)

    The string stLinkCriteria already contains the complete WhereCondition, no need to prefix it with [EIRID]=
    And when you print a report directly (as opposed to previewing it on screen), there is no need to close it.
    Replace the lines

    DoCmd.Echo True, ""
    DoCmd.OpenReport "CPRReport", acNormal, [EIRID] = stLinkCriteria
    DoCmd.Close acReport, "CPRReport"

    with this single line:

    DoCmd.OpenReport "CPRReport", acNormal, stLinkCriteria

Posting Permissions

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