Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Printing with Terminal Services 1

Status
Not open for further replies.

ABCRich

MIS
Apr 10, 2001
13
US
This questions requires a knowledge of Terminal Services and Access. I have an Access database that we use as a point of sale system and require the use of 2 printers. One is a receipt printer and one a plain paper printer. The plain paper printer is the default printer on the PC and needs to remain this way for other software. We need to print the receipts to the receipt printer. Normally we would just specify the printer on the report, but with Terminal Services the printers have a different name on each location. (Note: 9 seperate locations running Access on Terminal Services from one master db.) We think we can write a script to determine the name of the local printer each time the terminal server session starts, but how do we tell the receipt "reports" to print to that printer each session. Thanks in advance for the hlep.
 
This may seem dumb but if you create 9 reports one for each printer then call the one you need based on what your script returns

Dim stDocName As String

Select Case WhichPrinter

Case 1
stDocName = "Report1"
Case 2
stDocName = "Report2"
Case 3
stDocName = "Report3"
...
...
etc
End Select

DoCmd.OpenReport stDocName, acNormal

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
That would work if the printer names stayed the same, but with Terminal Services the printer name changes each time you login by adding a port number to the end of it. We have the ability to identify the name of the printer each session. I guess the real question is how to get access to print to a specific printer through coding. Is there a way to print to a variable and declare the variable to the printer name each session? Any ideas would be helpful. Thanks.
 
If you get the name of a printer with a script, can you save it to a ASCII file?

then Access could open that file?

Open Filename for Input as #1
Line Input #1, PrinterName
close #1
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Ah! Interesting question... what this guy is asking is how can you make Access print to a specific printer through some kind of script? I don't know the answer, but can you make access print to a file and then run a script to send that file to the specified printer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top