The dog owner record is related to the dog record that contains or is related to the exam record containing the PDFs
It is likely the vet is not related. Does any PDF append to the vet email or is an error message produced?
To phrase that another way. How are your tables set up? How do you currently link exams to owners? Is there also a link that links a specific Vet to the exam records?
Thank you David and Phil for taking your time to guide me. If I want to email to a Customer and to the Vet in one single email appended PDF exams, it works fine. I can choose to email either to the Customer, to the vet or to both, and all that works fine since the emailing is just for ONE pet at the time.
I can email to ALL customers of a clinic but, of course, one email with its appended PDF per pet, per customer.
What I can't do (can't figured it how) is to get ALL pet reports and put them in ONE PDF to email the vet. I can email the vet one email per pet, but he does not want to receive 10 or 20 emails for that clinic,he just want ONE email with ALL pets belonging to the event (clinic).
I hope it is more clear now and most important, that you can help.
Not really. That just restates you original post. What we are asking is HOW have you have designed the relative portion of your database?
HOW do you generate the PDF? You may not need to loop through a bunch of reports using save as PDF to merge them into a single file, you may be able to set up a new report layout that lists this data for all the Vet's animals and then a single PDF could be generated and emailed to the vet.
Phil, I guess by telling you I am able to email the vet a report for ONE pet I was confirming that the vet is tied to that pet, owner and clinic. I thought that's what you both were asking, if the vet is related to the pet. The vet table is populated with his information, when a Clinic record is created, the vet's name is chosen from a drop down list, when a customer is created,he/she is tied to clinic, when a pet is created is tied to the owner, when an appointment is made for that pet, the appointment is related to the owner and pet. When the first exam is performed, the exam is tied to the vet,clinic, owner and pet. same thing for the second exam.
Right now, when I want to email to ALL owners belonging to a Clinic, I just choose the Clinic and an email per owner, per pet is created. If an owner has more than one pet, two emails will be sent to him, but on either case both exams are appended into one PDF. And the same if I want to email the vet, ONE email per pet with appended PDF. and I want one email with ALL PETS in an appended PDF.
I do generate PDFs by looping through the exams for a particular clinic. You did give me the idea of sending all reports to a new layout and then generating the report from it. I think that is the way. Thanks a lot. I will get back to you if something does not work, but I am excited to try it.