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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syncronise form (Current) record with a report print

Status
Not open for further replies.

mondeoman

MIS
Dec 7, 2006
203
GB
I have a form that allows a central administrator to enter maintenance requests. I also have a report that shows the detail of a specific request. What I want to do is enable the administrator to click on a cmd button on the form that opens the report for that record only and then I want to be able email the report back to the user. I think it is about using a filter but I am not sure how to do it.

Form Name is: frm_Request_Detail
Report Name is : rpt_Support_Request_Print

Linked field is: Request_ID

Can anyone help please
 
Your code might look something like:
Code:
Dim strWhere as String
Dim stDocument as String
stDocument = "rpt_Support_Request_Print"
[green]'Assuming Request_ID is numeric[/green]
strWhere = "Request_ID=" & Me.Request_ID 
DoCmd.OpenReport stDocument, acPreview, , strWhere

I don't work with emailing reports but there is lots of information if you google it.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top