Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Need help with some code

  • 08-11-2012 4:20pm
    #1
    Registered Users, Registered Users 2 Posts: 349 ✭✭


    This a long shot I know, but if anyone is handy with a bit of code I really appreicate a bit help.

    Here goes working in Access 2010:
    frmInvoices has a command button which prints a rptInvoice based on [InvoiceNo] the code behind it is:

    If Me.Dirty Then
    Me.Dirty = False
    End If
    Dim strfrmInvoices As String
    Dim strWhere As String
    strfrmInvoices = "rptInvoice"
    strWhere = "[InvoiceNo]=" & Me!InvoiceNo
    DoCmd.OpenReport strfrmInvoices, acPreview, , strWhere

    That's fine when all I want to do is print an invoice. But I would like to be able to email in pdf format sometimes too. So I like a command button to select a report based on [InvoiceNo] save that report as Invoice No[InvoiceNo] & date in PDF format and attach it to an email. It doesn't really matter if the email address is filled out but if possible it would be great.

    Anyone any idea if this is possible and what code I'd need to make it work?
    Thanks in advance


Advertisement