Hi people need codes for displaying serial number in a receipt (ie a unique number after every transaction) here is the receipt code am working on
Private Sub CmdPrint_Click()
'printing a receipt
If MsgBox("Print Receipt?", vbYesNo, "Receipt") = vbYes Then
Printer.Print Tab(30);
Printer.Print Tab(30); "TIKMASH MANAGEMENT LIMITED"
Printer.Print Tab(30); "SERVICE CHARGE PAYMENT"
Printer.Print Tab(30); "KATAMU COURT, PLAINSVIEW, SOUTH B."
Printer.Print Tab(30); "L.R NO. 93/1272."
Printer.Print Tab(30); "TEL: +254 721800003"
Printer.Print
Printer.Print Tab(15); "---------------------------------------------------------------------------------------------------------"
Printer.Print Tab(40); "SERVICE CHARGE RECEIPT"
Printer.Print Tab(15); "---------------------------------------------------------------------------------------------------------"
Printer.Print
Printer.Print Tab(15); "Name:"; Spc(3); FrmTikmash.TxtName.Text
Printer.Print
Printer.Print Tab(15); "Unit NO.:"; Spc(3); FrmTikmash.TxtUnitNo.Text
Printer.Print
Printer.Print Tab(15); "Month:"; Spc(3); FrmTikmash.LblDate2.Caption
Printer.Print
Printer.Print Tab(15); "Amount Paid:"; Spc(3); FrmTikmash.TxtAmount.Text
Printer.Print
Printer.Print Tab(15); "Balance B/F:"; Spc(3); FrmTikmash.TxtBal.Text
Printer.Print
Printer.Print Tab(15); "Total Paid:"; Spc(3); FrmTikmash.TxtTotal.Text
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print Tab(15); "Service Charge:"; Spc(3); FrmTikmash.TxtPay.Text
Printer.Print
Printer.Print Tab(15); "Balance B/F:"; Spc(1); ".........................................."
Printer.Print
Printer.Print Tab(15); "Agent's Signature:"; Spc(1); "..........................................."
Printer.Print
Printer.EndDoc
End If
End Sub