Results 1 to 2 of 2
  1. #1
    tim_tims33 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Dec 2011
    Posts
    62

    Arrow Append and Delete query parameters not working in Macro!

    HI,



    I've been creating a simple macro which will append data and then delete data from a table.

    The criteria for the queries is found in a form, and this is used as a paramter.

    However, when i run this all as a macro...the append and delete queries somehow can't read the criteria in the form. Rather...i have to type in the criteria again...and then it works.

    I have attached a copy of my DB.

    1. Go to frmArchiveStock
    2. Select a stock from the combo box (this the criteria for the append and delete queries)
    3. Click the button to run macro mcrStockArchive.

    How can i get the queries to pick up the value entered in the form to act as a criteria when they run?

    Please help if you can.

    Thanks
    Attached Files Attached Files

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Your combo box is bound to the first column in your query. StockID. Move your criteria to the StockID field in your append query and remove it from the description. You will probably have to do the same for the update query. Because you have it in the description section and the combo box is showing the StockID, there will never be a valid execution of the queries.

    HTH

    Alan

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

Similar Threads

  1. Replies: 7
    Last Post: 07-14-2012, 01:02 AM
  2. Append query not working
    By seth.murphine in forum Queries
    Replies: 5
    Last Post: 04-20-2012, 06:41 PM
  3. #Deleted issue with Delete/Append Query
    By WendyCha in forum Access
    Replies: 4
    Last Post: 08-05-2011, 08:34 AM
  4. Replies: 2
    Last Post: 08-24-2010, 03:32 PM
  5. Replies: 0
    Last Post: 04-08-2010, 12:22 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