I have to generate reports for a list of source codes,a nd I want them output to separate PDF's. I have the code to the point where it will loop through the source codes, run the filtered report and pass the filename to the PDF writer. From there, I have to hit ENTER on the PDF writer dialog box to create the PDF, then do the same for the next and the next . . .
What I want is to let the program loop through them all automatically with no user intervention. Here's the problem:
I am using SendKeys to pass the filename, and my first thought was to add a chr(10) to the SendKeys line. That works for the first one, but when it loops to the second report, I get an error that it can't write to the device PDF Writer. I am guessing it is a timing problem. The PDF writer not having time to finish creating the file before Access tries to generate the next one.
Any ideas on how to do this? Has anyone tried something like this before?
Tim
What I want is to let the program loop through them all automatically with no user intervention. Here's the problem:
I am using SendKeys to pass the filename, and my first thought was to add a chr(10) to the SendKeys line. That works for the first one, but when it loops to the second report, I get an error that it can't write to the device PDF Writer. I am guessing it is a timing problem. The PDF writer not having time to finish creating the file before Access tries to generate the next one.
Any ideas on how to do this? Has anyone tried something like this before?
Tim