Good morning, I have been working with VBA in Access for a while now. I am a hobbyist but would like to learn a lot. I have already taken several (home) courses so I am not completely ignorant. But now to the point.
I have the code below where the code retrieves the email address from another form and attaches the report......but: If the email address is entered in Outlook then it says "test@adress.nl#mailto:test@adress.nl#". This way he does not send the email. I now have to manually remove #mailto:test@adress.nl# to be able to send the email. In addition, I need to have the form containing the email address "open", which is not desirable. It also loads all reports and not just the report linked by Control ID. Can/will someone explain to me how I can solve this and why things are not going well now? It's good if someone wants to change this, but please explain why things go the way they do because I really want to learn this.
Thanks for your help.
Form with mail: ContactFrm > Email
Form with button to mail: ControleArchief
Form with ID: ControleID
Report name: Rapport
DoCmd.SendObject acSendReport, "Rapport", acFormatPDF, Forms!ContactFrm!Email, , , _
"Keuringsrapport " & ControleID & "", "Bank payment", , False
Greetings Richard