Filter Reports. (1 Viewer)

travisdh

Registered User.
Local time
Today, 01:08
Joined
Jul 5, 2010
Messages
64
Hello All.

I apologise if this is a simple question but i am trying to work out how to best get this report working for my system.

Anyways i have a "Projects" form in which i select the customer it is for, and then all of the project information is entered into the system and the staff member can also enter samples into this window through a subform / tab control.

I have a report generated, which then takes the client and project information and puts it into a report, and then also lists all the samples in the report as well. Kind of like a sample receipt notice for the client.

The thing works alright at the moment without any filters, but I have no idea how to get it to work with a filter. The report takes data from a few tables and what I want to be able to do is two part, the first is to have a button on the table that filters the report based on the ID field (thats the actual name) of the table (a textbox), so that when the button is clicked the report is filtered and specific for that project that is shown in the project form.

The second part is once that works, id love it to be able to send that report as a PDF to the email address listed in the report.


The last bit is hopeful, but I was wondering if anyone has got any automatic reporting working, so that every hour or so the system checks the database for reports that need to be generated and sent, and sends them off, but also records if they were sent so that they are not duplicated and resent every hour. How might this be achieved.
 

travisdh

Registered User.
Local time
Today, 01:08
Joined
Jul 5, 2010
Messages
64
Let's start with the first. Here's one method to filter the report based on the record on the form (using OpenReport instead of OpenForm):

http://www.baldyweb.com/wherecondition.htm


Thanks for that, that was perfect, i now get a filtered report. Is there any way I can have that automatically emailed when it is clicked to the applicable client email address.

I have the tables linked, so Project.ID has a client lookup field which is a lookup field which is connected to Client.ID which then has another link to StafforFamilymembers which has an email field.

Is there any way I can automatically extract the email address and send that report to them, also on a side note, is there any way that I could send to multiple people if I can select multiple staff members for a client / project.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:08
Joined
Aug 30, 2003
Messages
36,124
Here's one method to send multiple, if this is what you want:

http://www.granite.ab.ca/access/email/reporttomultiplerecipients.htm

If you're just sending this one report, you can open it filtered using the method you're already using, then use SendObject to send it. If it's already open in Preview mode, SendObject should send the filtered report. You can get the address(es) from the form, or from a table with a recordset or DLookup. Check out SendObject in VBA help.
 

Users who are viewing this thread

Top Bottom