---------------------------------------------------------
Private Sub cmdCetak_Click()
.

SQL = "SELECT * FROM KasirDetil WHERE NoBukti = '" & txtNoBukti & "'"
Set rs = db.OpenRecordset(SQL)
If rs.EOF Or rs.BOF Then
JumRec = 0
Else
rs.MoveLast
JumRec = rs.RecordCount
End If
rs.MoveFirst

open "lPT1:" for output as #1
Print #1, Tab((45 - Len(Trim(NamaToko))) / 2); Trim(NamaToko)
Print #1, Tab((45 - Len(Trim(Alamat))) / 2); Trim(Alamat)
Print #1, Tab((45 - Len(Trim("Telp. " + Telpon))) / 2); Trim("Telp. " +
Telpon)

close #1

.
.

Exit Sub

Thanks
Ronald Irawan
http://www.Foodinvestment.com/?id=ronald_delgeano
http://www.agloco.com/r/BBDK9147
Jakarta



"Dekky Liu" <[EMAIL PROTECTED]> 
Sent by: [email protected]
04/07/2007 15:20
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
[indoprog-vb] HELP: Cara Pakai Open Printer.port Error 52






Hallo Pak Masino

Hallo para senior, begini nih, bisa tolong bantu saya tidak ya .. saya mau
print struck dari vb 6.0
tetapi saya ingin printer saya tidak rolling terus setelah baris terakhir
telah ter print. Saya pernah baca harus menggunakan perintah open dan 
close
:

----------------------------------------------------------

Printer.EndDoc '<-- This will eject the paper till the end
' of paper

'If you don't want printer roll up the paper till the end,
'you can use the following code. The printer head will be stop
'just after printing the last line in richtexbox control
'Here is the code:
'Open Printer.Port For Input As #1
' Printer.Print rtfLap1.Text
'Close #1
----------------------------------------------------------

saya berusaha mencobanya dengan FOR INPUT atau FOR OUTPUT, tetapi terus
gagal dengan ERROR 52. bisa tolong dibantu gak ya. Ini potongan script
command_click print saya :

----------------------------------------------------------
Private Sub cmdCetak_Click()
.

SQL = "SELECT * FROM KasirDetil WHERE NoBukti = '" & txtNoBukti & "'"
Set rs = db.OpenRecordset(SQL)
If rs.EOF Or rs.BOF Then
JumRec = 0
Else
rs.MoveLast
JumRec = rs.RecordCount
End If
rs.MoveFirst

Printer.Width = 20000
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.ScaleMode = vbCentimeters
Printer.FontName = "Arial"
Printer.FontSize = 8
Printer.FontBold = True
Printer.Print Tab((45 - Len(Trim(NamaToko))) / 2); Trim(NamaToko)
Printer.Print Tab((45 - Len(Trim(Alamat))) / 2); Trim(Alamat)
Printer.Print Tab((45 - Len(Trim("Telp. " + Telpon))) / 2); Trim("Telp. " 
+
Telpon)

Printer.NewPage
Printer.EndDoc

.
.

Exit Sub
----------------------------------------------------------

Bagaimana ya saya embed perintah open printer.port dan close nya itu di
dalam script saya diatas ini, saya sudah mencoba berbagai cara juga masih
belum bisa ..
tolong dibantu ya mas. Thx a lot.

 


[Non-text portions of this message have been removed]

Kirim email ke