Skip to the posts
Buffalo's neighborhood journals since 2003 🍀 Patrick Spicy Devil Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt Utica Pink Cherio❄️ Snow Murder

heidi’s journal

VBA?

·

Ugh... almost done with this stupid access db and I need to make a form print two copies and stop having a blank second page (which may just be from imperfectly arranged fields. Here's the code:


Private Sub PrintTicketButton_Click()
On Error GoTo Err_PrintTicketButton_Click

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_PrintTicketButton_Click:
Exit Sub

Err_PrintTicketButton_Click:
MsgBox Err.Description
Resume Exit_PrintTicketButton_Click

End Sub



Suggestions, anyone?

It's been so long since I've done any coding! (damned tax law) My developer reference books are all in storage in PA.

💬 11 comments

  1. tinypliny ·

    I don't know about coding... but my uni library recently bought a ton of MS Access books (I got an email about). If you could let me know which book you are looking for, I could take a look and see if I can get you access..
  2. paul ·

    Sorry I don't touch the microsoft stuff. That being said i don't see anything in there that would make it print a second blank page. It must just be imperfectly arranged fields like you said.
  3. heidi ·

    Thanks, @tinypliny, but I need it now to deliver the db tonight via email. @paul - Yeah, yeah, never doing it again! (I hope.)
  4. tinypliny ·

    The access is pretty much instant...
  5. tinypliny ·

    Is this related: :::link:::
  6. heidi ·

    Definitely related (and the critique of using a form instead of a report is correct)... I'll see if I can get it to work. Thanks :-)
  7. heidi ·

    Yep, it worked! Now I'm getting two copies of the form and two blank pages. Soooo close!
  8. tinypliny ·

    Something to do with formatting maybe...
    :::link:::
    :::link:::
    :::link:::

    All these are about resizing to get rid of blank pages... but who knows!

    Then there is this video that I haven't seen: :::link:::
  9. heidi ·

    Finally got it down to the appropriate 2 pages with no apparent reason why. I'm finishing up the daily report for the db and then I'll be able to ship it off to the client. Hopefully they won't want/need additional stuff. The weighstation doesn't have internet access (although they're considering getting a Verizon data plan) so getting into the system to make changes is rather difficult. Thanks for your help! :-)
  10. heidi ·

    Yea! Done! One totally cheezy inputbox, but the rest is pretty professional.
  11. tinypliny ·

    Congrats! :)

    I am not done yet... Going to chug along a bit more before I collapse..

💬 Write a comment