Results 1 to 3 of 3
  1. #1
    Pickboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    5

    Question Add item to an order form - rental purpose

    Hi,
    i'm trying to design a simple access db to manage a small amount of asset that I am renting.
    What I want is to be able to add existing asset to an order via a subform in a form but when I try to add items via my combo box in the subform i've got the error : " Cannot add record;join key of " table" is not in recordset.
    I've took this demo for example to develop my form, but he skip a lot of step in his tutorial and i can't figure out what i'm doing wrong in my case: https://www.youtube.com/watch?v=E_nMGZYlvSM
    here an example of the relationship :
    Click image for larger version. 

Name:	relation.PNG 
Views:	18 
Size:	8.4 KB 
ID:	35063
    here is the problem :
    Click image for larger version. 

Name:	problem.jpg 
Views:	18 
Size:	95.6 KB 
ID:	35064
    here is the file :
    Database4.zip



    I am pretty sure the solution is pretty easy but I can't find how to do it.

    Thanks for anyone who can told me how to solve that !

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Example: you would have 2 tables: tOrder & tOrderDetail
    these would join on the OrderID field.
    NO other tables would be joined.
    The items being added to the order would come from tInventory table. This is a lookup table NOT a dependent so it would not be in the relationship.
    Its just the source to get items into the orderDetail.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    PickBoy,

    I think you should describe your requirement in simple English so readers understand what you are wanting to do.
    I don't think your model (tables and relationships) match your requirement (call it a hunch).

    What do Start_on and Return_on mean?
    Why does table Order have Project_Name as a field?

    If you are renting Assets, then you may want to consider a Library as a model ( books{inventory} are loaned to and returned by {Customers})

    Or this one which may be more appropriate. This could be a starting point, you can add/edit or remove any pieces that don't apply to you.

    Here is a link to a lot of info on Database Planning and Design (and more) that you may find helpful.

    Good luck with your project.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-30-2018, 06:18 AM
  2. Replies: 3
    Last Post: 04-25-2017, 10:46 AM
  3. Replies: 2
    Last Post: 03-07-2016, 05:02 PM
  4. Replies: 2
    Last Post: 09-14-2015, 09:01 AM
  5. Help generating line item number in order table
    By acenumber5 in forum Queries
    Replies: 18
    Last Post: 08-23-2012, 12:50 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