Refresh/Requery ODBC linked queries on forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DoubleD
    New Member
    • Jun 2015
    • 24

    #1

    Refresh/Requery ODBC linked queries on forms

    Hi. Hope someone can help me. First off, I am not a developer and everything I know about VBA I taught myself.

    I have 2 forms that have quite a bit of data on them. On a form called "Move Stock", I am creating a stock transfer in another database without any issues, but after this transaction has been completed (It is a basic Insert SQL query that I am running), I need the form to requery the available stock quantities. On Form Load, the available quantities are displayed by running a select from an ODBC Linked view in SQL using form text box values as parameters.

    I have tried executing
    Code:
    Me.Requery
    and
    Code:
    Me.Refresh
    and the same on the actual controls, but the available quantities still stay exactly the same.

    Can someone please try and assist me?
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    The first thing that I would do is to make sure that your changes have been saved. Try going straight to your backend and run your query and see if it has the data changes.

    Comment

    • DoubleD
      New Member
      • Jun 2015
      • 24

      #3
      Hi Seth. The changes are definitely saved. I can see the data that was inserted to the database.

      Comment

      • Seth Schrock
        Recognized Expert Specialist
        • Dec 2010
        • 2965

        #4
        You say that you are getting your values from a SELECT statement being run in your Load event. Try running that same code as a replacement for you Me.Requery.

        Comment

        Working...