Results 1 to 2 of 2

Thread: Emailing a report in VBA with correct record

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    367

    Emailing a report in VBA with correct record

    I am using VBA and I am having a little trouble emailing a report.

    Basically I have a single form that the user inputs data through and is then saved into a table.

    I also created a report which is identical to the form in appearance and this report is what I need to have emailed.

    I used a macro and have no problem emailing the report as a snapshot with data from the table.

    The problem I am having is the report is ONLY using data from the first record in the table.

    On the form is a command button that the user clicks in order to email the report after they key it in. How do I get this command button to email the report with the current information they just entered?

  2. #2
    Addicted Member malik641's Avatar
    Join Date
    Sep 2005
    Location
    South Florida :-)
    Posts
    221

    Re: Emailing a report in VBA with correct record

    It'd be nice if there was an example workbook to follow what you are saying a little more easily....but from I understand you could:

    -Have a Public variable to keep track of each last row of data that was entered
    -Use a "find last row" method if the data is stored into the last row each time entered
    -If all of the data that is put into the table is used from the form, you could store that data into [public] variables and use those for the email


    I hope I understood you correctly. Let me know if I didn't




    If you find any of my posts of good help, please rate 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
  •  



Click Here to Expand Forum to Full Width