B
Brian G via AccessMonster.com
Forgive my noobiness but can't seem to get this function to funciton (heh, a
little noob humour).
I am calling this from a form to grab all of the printer names and save them
to a small table.
Function ShowPrinters() As String
Dim strPrinters As String
Dim lngLen As Long
Dim prn As Printer
For Each prn In Application.Printers
strPrinters = strPrinters & prn.DeviceName & ";"
Next
lngLen = Len(strPrinters) - 1 'without trailing ";".
If lngLen > 0 Then
strPrinters = Left(strPrinters, lngLen)
ShowPrinters = strPrinters
End If
End Function
I cobbled this thing together from a couple of posts forgive my wrecklessness.
little noob humour).
I am calling this from a form to grab all of the printer names and save them
to a small table.
Function ShowPrinters() As String
Dim strPrinters As String
Dim lngLen As Long
Dim prn As Printer
For Each prn In Application.Printers
strPrinters = strPrinters & prn.DeviceName & ";"
Next
lngLen = Len(strPrinters) - 1 'without trailing ";".
If lngLen > 0 Then
strPrinters = Left(strPrinters, lngLen)
ShowPrinters = strPrinters
End If
End Function
I cobbled this thing together from a couple of posts forgive my wrecklessness.