Using current record in append query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SJ1000
    New Member
    • Mar 2008
    • 3

    Using current record in append query

    Hi,
    I think I have a simple question that I just can't figure out. I want to have a command button on a form (via a macro) run a query to append the data on that form to another table.I want it to append the current record on the open form. I am not familiar with VBE so I want to use a macro.

    How does the query pull the current record? I have an ID field and have tried setting the focus on that field but it still pulls all the records not just the current one. Any help is greatly appreciated!
  • MindBender77
    New Member
    • Jul 2007
    • 233

    #2
    Originally posted by SJ1000
    Hi,
    I think I have a simple question that I just can't figure out. I want to have a command button on a form (via a macro) run a query to append the data on that form to another table.I want it to append the current record on the open form. I am not familiar with VBE so I want to use a macro.

    How does the query pull the current record? I have an ID field and have tried setting the focus on that field but it still pulls all the records not just the current one. Any help is greatly appreciated!
    This is a bit hard to explain so bear with me. You need to modify your append query so that one of your field's criteria is equal to the value in your text box.

    In the criteria under your field name of your append query. Specify which records to append by making the query only append values that are the same as your text box like so:

    Code:
     [Forms]![YourFormName]![TextBox]
    Hope this points you in the right directions,
    Bender

    Comment

    • SJ1000
      New Member
      • Mar 2008
      • 3

      #3
      Fantastic!! That's what I needed, thanks!


      Originally posted by MindBender77
      This is a bit hard to explain so bear with me. You need to modify your append query so that one of your field's criteria is equal to the value in your text box.

      In the criteria under your field name of your append query. Specify which records to append by making the query only append values that are the same as your text box like so:

      Code:
       [Forms]![YourFormName]![TextBox]
      Hope this points you in the right directions,
      Bender

      Comment

      Working...