Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue on sending report as attachment via mail

Status
Not open for further replies.

pdtit

Technical User
Nov 4, 2001
206
0
0
BE
Hey,

I have a button on my form which gives me the report preview based on a criteria where the PONr of my form is the same as the one on the report.
In this case, when asking to print the report, it will give me only the report for the current PO on my screen.

I wanted to go a step further, and have a button to email the report to the supplier's emailaddress on the form.

Everything works, except for my criteria.

When using the docmd.sendobject ... there is no way I can enter criteria to compose the report for only the PO-order I'm in on the screen.

Does anyone know how I can do this ??

Regards,

PdtIt
 
Hi Pdtit,

I think what you need to send the PO# to the criteria of the query of your report (I assume the PO# is your key field in your report. What I have done was :
1. make a global variable in module.
2. Send the value from the form to the global variable. It can be done with put it the code in "after update" in a PO# combo box. Or when you click the button ask the form to catch the value in po# field.
3. put it the global variable in the criteria query for it's report.
May be some one has better solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top