VBA Printing (multiple queues/print lists)

MFrost

New member
Local time
Today, 21:21
Joined
Jul 8, 2009
Messages
9
Edit: Looks like i may have posted this in the wrong forum. (oops!). Should have probably been Access Modules and VBA, sorry.

Hi all,

I have done some searching but couldn't really find anything like what I was after. (If it's possible)

  • I have 100 queries is Access.
  • A print out of each of these queries have to go to 10 different people.
  • A different person has the query filtered for their name only. (So each persons output of the 100 queries is different)
  • I currently have a bit of code that loops through the 100 queries, filters for a single persons name then prints.
  • The loop is then repeated for the next person, re-opening the queries and filtering for the next person.
  • This makes all the prints come out in a logical order, each persons prints are in a bunch (e.g. Person = 1, queries 1-100; Person = 2, queries 1-100)
The problem is that this is extremely inefficient because each query is opened and filtered 10 times. Which in effect means 1000 queries opened (very slow!). Hence me currently trying to re-write.

Now I’m trying to make this more efficient and I have the code that opens the query, filters for a name then prints, filters for another name then prints, etc. etc.



This is where I have a problem.
  • Now the printouts are in a really silly order (e.g. Person 1, query1, Person 2, query1)
  • I am trying to find a way to set up 10 print lists in VBA (one for each person) and print all jobs the corresponding list.
  • Then when all the lists are populated, sent list 1 to the printer, then list 2; etc. etc. (Getting the print outs back into the correct order).
I hope what I’ve written in understandable (I tried hard, honest!)

It theory behind it doesn’t sound that complicated, but a lot of searching on Google/here has not returned any results that seem to have anything like a "print list" or "virtual print queue".

Does anyone have any ideas about this method, or any others ideas that could achieve the same effect?

Thanks a bunch in advance!

M Frost
 
Last edited:

Users who are viewing this thread

Back
Top Bottom