In my Access program on a form I have a button that allows the user to choose a scanner and then scan 1-10 items one at a time. I have a loop which pauses so that the person can put on another sheet. Currently though the user has to pick the scanner every time in the loop because I use this line:
Set wiaScanner = wiaDialog.ShowSelectDevice
The scanner popup appears, they click on the scanner they want and it runs beautifully. The problem is that I only want them to pick the scanner once and then have the system remember their choice no matter if they are scanning 2 pages or 10 pages. Currently the above line of code is inside the loop for scanning (where I set various scanner properties) but when I tried moving it outside the loop, on the second go around it would error out asking for an object (so I am assuming it forgot the scanner) so I moved it back inside the loop.
I have not been able to make this happen no matter what I try (I even tried sendkeys to manipulate the dialog box but that failed).
Does anyone know how I can have the system remember the selected scanner? Another option could be that the user puts 1-10 pages on the feeder, the scanner scans them all in at once and I use VBA to chop up the scanned pages into 1-10 individual files (this way I do not even need a loop and I can use the scanning code just once).