command button to create report for the current record

  • Thread starter Thread starter igc
  • Start date Start date
I

igc

Guest
I need my form to be filled out and sent to the purchasing dept for approval. I created the form and it opens in add mode, we enter the material needed and then we need to email it to purchasing. My thought is to create and email a report based on the record I just entered. I can't figure it out. I did create a command button but and it is opening a report but it's showing all the records. Any ideas please let me know. Thanks so much
smile.gif
 
Pick criteria off your form to use in a query which is the record source for your report.
 
Sorry I just found the reply button, If you just got this I sent you an email earlier. Thanks again
 
Base your report on a query and in the criteria of the ID field for the record filter it to your form (make sure that the ID field is part of the form's query too:

Forms![formname]![formfieldname]

You can use the build button to reference the form.

You could also use SendObject on the command button to send an email message with the report attached. I use snapshot viewer.

On the OnClick event of the command button:

DoCmd.SendObject acReport, "ReportName", "Snapshot Format"

Because the filter is set in the report, it will only attach the report for the record that is currently open on the form.

If you have the recipient's email address as part of the form, you could include that within the VBA so that the address is automatically placed in the email message

DoCmd.SendObject acReport, "ReportName", "Snapshot Format",Me.EmailFieldName
 
Just email a current record, please!

Ok, I'm getting tired of this. I just want some detailed instructions, from start to finish in plain english. I have a form, were a current record is displayed, I want to email that form to purchasing with only the curent record please. Why is there so much threads inclosed, but nobody can put it into perspective?
 

Users who are viewing this thread

Back
Top Bottom