Originally Posted by
orange
Tell us more about the application. Is this a web app? How do you interact with the bank etc?
Thank you for answering.
I am sending you the Whole vba code. Using red color for comments.
The code is executed by pressing a button control "TransferAmount", using touch screen.
Please let me know if you need more information.
Code:
Private Sub TransferAmount_Click()
Set BAX = CreateObject("BankAxeptSrv.BankAxeptAutomation")
If BAX.Connected And BAX.LicenseVerified And Not BAX.BankMode Then
Dim amnt As Long
Dim cashb As Long
amnt = Round(Amount.Value * 100)
cashb = Round(Cashback.Value * 100)
If BAX.TransferAmount(amnt, cashb) Then
While BAX.BankMode
While BAX.GetNoOfDisplayMsgs > 0
DisplayMsgs.SetFocus
DisplayMsgs.AddItem (BAX.GetDisplayMsg)
DoEvents
Wend
DoEvents
Wend
While BAX.GetNoOfPrinterMsgs > 0
PrinterMsgs.SetFocus
PrinterMsgs.AddItem (BAX.GetPrinterMsg)
DoEvents
Wend
If BAX.TransactionOK Then
TransactionStatus.SetFocus
TransactionStatus.AddItem ("OK")
IssuerID.SetFocus
IssuerID.AddItem (Str(BAX.GetIssuerID)) 'The IssuerID is picked up here.
Dim lPauseTime As Long
Dim lStart As Long
lPauseTime = 3 'Number of seconds
lStart = Timer
Do While Timer < lStart + lPauseTime 'The timer is used for waiting for the pickup of IssuerID.Takes about 2 to 2,5 Seconds.
DoEvents
Loop
Me.IsID = Me.IssuerID 'Trying to copy to IsID, but that do not work because IssuerID is not saved.
DoCmd.RunMacro "Auto A kort" 'This is printing out a check on the cash register.
Else
TransactionStatus.SetFocus
TransactionStatus.AddItem ("AVVIST")
IssuerID.SetFocus
IssuerID.AddItem ("99")
DoCmd.RunMacro "Avvist 2.BTKForm"
End If
End If
End If
End Sub