I am having a very bizarre issue and I was wondering if someone can shed some light on the problem.
We have an MS access application that our customers use through Terminal Server / Remote Desktop Service (In this case to a Windows 2012 Server but the bug occurs in Windows 2008 and 2003 Server as well).
When the customer connects the first time to the ms access application they can print to redirected printers normally. They usually stay connected to the server however sometimes they may need to close their rd connection or they may lose rd connection momentarilly to the server until it automatically reconnects.
The problem we are having is that on reconnection not all the printers are available in the MS Access Application. Very frequently, only a few printres are available. Enumerating Application.Printers only returns some printers but not all. In order to temporarily resolve the issue, our customer needs to restart his MS Access application for the printers to reappear.
Even more weird is that all printers appear in the Devices and Printers section on the server and you can test print without a problem.
I have done a few test in VBA and realized that when the rd connection is restarted, the Printers Collection Object only enumerates some printers and not all and I think this is where the issue is coming from. However I don't know if there's a way to "reset" or "refresh" the object without exiting the application. Set Application.Printer = Nothing doesn't work.
The reason why I can't just simply close and open the ms application is because Terminal Server is configured to only open the specified ms access program so once it's closed, the connection is closed as well and it's a huge burden on the customer to restart his Remote Desktop connection every time.
I was reading on the subject and read to keep a list of the printers in a temp table as soon as the application starts so that if the application loses some printers we'll have a list of them saved and can use them. However, I've tried doing that and something like Application.Printer = Application.Printers("name of saved printer") returns an Error 5, Invalid procedure call or argument. I guess if the printer is not in the collection then it can't work.
If anyone can help or has experienced this please let me know how to resolve this!!