Results 1 to 6 of 6

Thread: Access Build event to print form letter

  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Access Build event to print form letter

    I have built an event attached to a button to print an approval letter on a specific file when approval is received. It prints the letter beautifully. However it also prints the form screen that has the button on it. I've modified the event to close the form before printing the letters and I still get the form printed.

    Any ideas on how to fix this?

  2. #2
    Join Date
    Nov 2002
    Location
    Hanover,Germany
    Posts
    27
    please post the code you wrote

  3. #3
    Join Date
    Mar 2004
    Posts
    4

    Build Event: Code

    From the button on my form, I set up a build event with the following sequence:

    Close (Form)
    Open Query (Today's Approvals)
    Requery
    Close (Query)
    Open Report (Approval Letter)
    PrintOut (Pages, from 1 to 1)

    This prints the letter beautifully but still prints the form screen even though I closed it. I would like to have it print just the letters and not waste the extra paper on the form screen.

  4. #4
    Join Date
    Nov 2002
    Location
    Hanover,Germany
    Posts
    27
    try to start the printout from the opening event of the report not to start it from the form, that should work

  5. #5
    Join Date
    Mar 2004
    Posts
    4

    Built Event

    I tried taking out the close reference and stripped it down to just Requery, Open Report, PrintOut. I still prints the form screen. Any other ideas?

  6. #6
    Join Date
    Nov 2002
    Location
    Hanover,Germany
    Posts
    27
    if i get this right you still start the printout from the from ?! (Take the printout out of this event an use it at the report)
    (Private Sub Report_Open(Cancel As Integer)

    DoCmd.PrintOut xxxxx

    End Sub

    maybe it´s possible to attach the databasefile or a part of it?

Posting Permissions

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