Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113

    Hello Vlad, attached is the zip of the database as you requested. I am trying to do the append query but is not adding a new record, it says that I have a Key violation error. I removed the table PurchaseOrderDetails, and still gives me error. Well I hope you can figure it out. Thanks for your help.
    Attached Files Attached Files

  2. #17
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    I think you forgot to include the query you mentioned in your first post that calculates the amount of each part number by supplier that needs to be re-ordered. That is the starting point of this thread and one of the most important parts.

    I have started to modify the sample you provided but it because of your relationships and the empty tables you provided it is a slow process. I still think that once you look at it you'll see where you need to go. The supplier combo was listing the name only but you needed the supplierid, have a look at how I changed it into a 2 column rowsource with the first one (supplierid) hidden by setting the width to 0.

    Try to finish the second append yourself (and the rest of the stuff I mention there) and post back if get stuck.

    Cheers,
    Vlad
    Attached Files Attached Files

  3. #18
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Thank you Vlad, Things are looking in the right direction, but still I can not get the first Append query to work. When I do View, the query looks perfect, just what we want, then I run it and it gives me Key violation error and does not append the record to the table PurchaseOrders. This time I included the query that finds the parts that need to be reordered and tried to work on the form, subform and somehow I can not get the two to link... But still the first append query is the key to all this working. So thanks again for all your help.
    Attached Files Attached Files

  4. #19
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Hello Vlad, I found the error for the append query I just had to add the SatusID to the query and make it equals 1. And it works, now I am trying to find the Invoice number from the PurchaseOrder Table from the query that finds all the parts. Thank you for all your help, I never did a query without a table before... I guess I have to learn more sql.

  5. #20
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    hi there. You should try to do a compact and repair on the file that has your tables
    Have you looked at my query (qryAddNewPO)? I think it was working in the sample I've uploaded.
    Cheers
    Vlad

  6. #21
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Hello again. I got everything running and I have a last question for today, is there a way of getting rid of those annoying warnings each time we run the append query. Thank you..

  7. #22
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Use Docmd.Setwarnings false before the first one and reset them to true after the the last one (Docmd.Setwarnings True).

    Cheers,
    Vlad

  8. #23
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Is working like a charm... Thanks to all of you...

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

Similar Threads

  1. Replies: 4
    Last Post: 05-28-2015, 10:48 AM
  2. Replies: 5
    Last Post: 11-12-2014, 04:36 PM
  3. Replies: 1
    Last Post: 07-20-2012, 09:48 AM
  4. Query results in subform
    By MWMike in forum Forms
    Replies: 5
    Last Post: 09-28-2010, 05:19 PM
  5. Replies: 0
    Last Post: 03-31-2010, 07:52 AM

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