Allright Paul,
Thanks for your quick reply. Then another question. I'm still not able to reproduce the next part to my own situation.
DoCmd.OpenReport strRptName, acViewPreview, , "[TableWithNames].Name='" & ![Name] & "'"
DoCmd.OutputTo acOutputReport, strDocName, acFormatPDF, "C:\Pdfs\" &...