Use an input form to generate a report (1 Viewer)

RussellDeano

Registered User.
Local time
Yesterday, 16:09
Joined
Aug 19, 2017
Messages
22
Good evening all,

Again apologies i am a basic access user and still learning the ropes.

I have an input form for my database (which holds details of incidents that occurred at my workplace). The users have always inputted the incident details into the form and then simply clicked "Save" and it gets saved to my database.

For reports the database has always been searched using a query which then displays the reports (incidents between x dates for example).

Now we have to create a report for each incident that occurs. I was wondering if it is possible to automatically generate a report of that individual incident as soon as the user clicks "Save". They can then save the report to PDF and email it to the responsible manager.

I hope this makes sense.

I have not used code in my database and i use macro builder for most things.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:09
Joined
May 7, 2009
Messages
19,229
For individual report you can create another unbound report. Each field recordsource is the form object, ie:

=[Forms]! [yourForm]! [Incident ID]
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:09
Joined
Feb 19, 2002
Messages
43,233
There is no need to create an unbound report.

The RecordSource of the report simply needs to reference the ID of the record displayed on the form:

Where MyPK = Forms!yourform!MyPK

So you can save the report as a PDF and then email the PDF.

If you ALWAYS want to do this, you can put the code into the AfterUpdate event of the form.
 

Users who are viewing this thread

Top Bottom