Dear Experts!
Sorry once again!
I want to have a POS receipt sent directly to the printer after selecting the receipt number in the combo box using the after events property, but it is giving me an error. I do not want to preview anything here , below is my VBA Code.
(2) since after printing the header form is completed automatically, now suppose the change his/her mind, can the transaction be canceled without creating a new blank transaction.
Sorry once again!
I want to have a POS receipt sent directly to the printer after selecting the receipt number in the combo box using the after events property, but it is giving me an error. I do not want to preview anything here , below is my VBA Code.
Code:
Private Sub CbotemporalSigningCombo_AfterUpdate()
On Error GoTo 0
Me.txtPrintPOSKitwe = Me.CbotemporalSigningCombo.Column(0)
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT [tblPOSStocksSold].[ItemSoldID] FROM [QryTemporalSigningPOS] WHERE [tblPOSStocksSold].[ItemSoldID] = " & Me.CbotemporalSigningCombo
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryTemporalSigningPOS"
db.Close
Set db = Nothing
MsgBox "Your invoice has been signed and now being printed", vbInformation, "Please Proceed"
On Error GoTo 0
DoCmd.OpenReport "RptPosReceipts", acViewPreview, "", "", acNormal
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, "RptPosReceipts"
Me.CbotemporalSigningCombo = ""
Me.CbotemporalSigningCombo.Requery
Me.FCRate = 1
Me.CurrencyType = "ZMW"
Me.PosDate = Date
Me.Cashier = Forms!frmLogin!txtpersoning.value
Me.CartID = 3
Me.SalesTypes = 0
Me.PaymentMode = 0
Me.TransactionType = 0
Me.AllocationDate = Date
Me.WHID = Forms!frmLogin!txtBranchOne.value
Me.sfrmPosLineDetails_Subform.SetFocus
On Error GoTo 0
End Sub
(2) since after printing the header form is completed automatically, now suppose the change his/her mind, can the transaction be canceled without creating a new blank transaction.