Results 1 to 5 of 5
  1. #1
    stigb is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    3

    Saving incoming data to a Table in a Form in Access.

    I have a Form "BKTForm" in an Access db connected to a Table/Query.


    When the form opens, it contains values in 2 controls, already registered in the Table/Query.

    It is 2 more (fields) controls in the Form ready for registration.

    "IssuerID" is a List in the Form connected to a Table/Query field as Value list.

    The second (fields) control is a Text box "IsID" where the value from
    "IssuerID" will be stored later in the proses using Me.IsID = Me.IssuerID.
    This is working OK if I am able to save the "IssuerID".

    "IssuerID" is getting the value from a bank terminal, sending a number to "IssuerID."

    The only way I have been able to save the number, sent from the bank terminal in the
    Table/Query field "IssuerID", is by clicking on the field with the cursor with left mouse button.

    Is it possible to do that using VBA code instead?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Tell us more about the application. Is this a web app? How do you interact with the bank etc?

  3. #3
    stigb is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    3
    Quote Originally Posted by orange View Post
    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
    
    

  4. #4
    stigb is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    3
    I am sorry. Didn't aswer all questions.

    It is a cach register in a brew pub. Contact With the bank is by a bank terminal conected via Internet.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Maybe
    Me.IsID = Str(BAX.GetIssuerID)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Saving data in wrong table
    By Thompyt in forum Access
    Replies: 1
    Last Post: 10-15-2014, 01:25 PM
  2. Integrating Incoming Email into Access DB
    By andytreusch in forum Forms
    Replies: 3
    Last Post: 08-14-2013, 06:14 PM
  3. Saving data back into a table from a form
    By skyview chick in forum Forms
    Replies: 22
    Last Post: 08-15-2012, 05:43 PM
  4. Data Not Saving To Table
    By AUS1960 in forum Forms
    Replies: 2
    Last Post: 05-11-2011, 05:35 AM
  5. Replies: 1
    Last Post: 04-19-2011, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums