dblRetValue = Shell("\\dohsfphpe1601\netdata\sysadmin\inventorylists\ipdatabase_printerassign.bat " & strComp & ", " & strCompSource & ", " & StrPrinterID
2, vbHide)
Would you care to explaine the "2" that I've highlighted in the above code ?
Also:-
Is PrinterId1 a combo box ?
and if so is it's RowSource CitrixPrinters ?
If so then using
Private Sub PrinterID2_AfterUpdate()
Me.PID = DLookup("MachineName", "CitrixPrinters", "PrinterID1 = '" & Me.PrinterID2 & "'")
End Sub
is real bad practice and a very slow way of doing things.
Better to include MachineName in the columns that PrinterID2 knows about
Ie
RowSource = "SELECT PrinterId1, MachineName FROM CitrixPrinters"
Then the PrinterID2_After_Update event is totally unnecessary
and you delete the
Dim strCompSource As String
and the
strCompSource = PID
in the main code and use
Code:
dblRetValue = Shell("\\dohsfphpe1601\netdata\sysadmin\inventorylists\ipdatabase_printerassign.bat " & strComp & ", " & PrinterID1.Column(1) & ", " & PrinterID2, vbHide)
instead.
(I'm guessing that the Str in the front of StrPrinterID2 is the error that is causing your syntax error.)
'ope-that-'elps.
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.