Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    ccorley is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2016
    Location
    Colorado Springs, CO
    Posts
    10
    Question: What if any is the difference between OrderID and ExpenseID? You use order number in the Me![OrderID] reference, but it isn't in tempLine or Line, so those Insert and Update statements will give you an error.[/QUOTE]


    ANSWER: I do not have an OrderID field, only ExpenseID. The order reference I used is Me![ExpenseID]. The field LineExpenseID in the "tempLine" table is linked to ExpenseID field in the "tempExpense" table.

    As far as the error in the Line, could I be getting the error because there are more than one row in the "Line" table that is linked to the same ExpenseID? The rows in the Line table are the line items for the order. Wouldn't I have to go through each row in the "tempLine" table and insert them one by one to the "Line" table?

  2. #17
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I do not have an OrderID field, only ExpenseID.
    Oops - my mistake, and apologies for the confusion.

    In the "Line" table, check the indexing on ExpenseID. It has to allow duplicates, because as you say there can be more than one line item for any specific ExpenseID.

    To check this, try deleting the index to see if the error disappears. If you still get the error, try deleting all the indexes, run your procedures a few times, then add the indexes back until you find one that fails.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 02-08-2014, 03:06 PM
  2. Copying rows depending on number of fields full
    By tmpgovrel in forum Queries
    Replies: 4
    Last Post: 09-03-2013, 12:11 PM
  3. Copying selected rows from an access table.
    By Monu in forum Import/Export Data
    Replies: 1
    Last Post: 04-10-2013, 12:15 PM
  4. Replies: 5
    Last Post: 12-08-2011, 10:52 AM
  5. Keep From Copying Database
    By jmyersnc in forum Programming
    Replies: 2
    Last Post: 02-07-2010, 07:44 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