Results 1 to 2 of 2
  1. #1
    Guru86 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    3

    Parent Child Relationship


    I am currently building a database and it has to deal with job numbers. The primary key between the three databases is the job number, but on of the databases keeps track of the expenses that hit that job. so my question is how do I include all of the invoices sepratley but still have the job number asociated.

  2. #2
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742

    Typical Method

    The invoice table should allow each invoice to have its own record, with a primary autokey, with the job number as one of the fields on the record. Use the primary key (JobID) of the job record to link the associated records on each table.

    Code:
    tblJobs
    JobID     autokey
    JobName   text
    
    tblInvoices
    InvID     autokey
    JobID     foreign key to Job
    (then all the invoice details)
    If you need to have some specially formatted JobCode that people will use/input to access the file, then put it on tblJobs, but keep it separate from the autokey field, and it will save you lots of trouble in the long run.

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

Similar Threads

  1. child references to parent
    By GraeagleBill in forum Programming
    Replies: 4
    Last Post: 04-10-2013, 02:25 PM
  2. Passing value from parent to child form
    By Pragmatic in forum Forms
    Replies: 1
    Last Post: 12-02-2011, 07:23 PM
  3. Child/Parent relationship
    By ErnieS in forum Forms
    Replies: 1
    Last Post: 08-20-2010, 01:22 PM
  4. Calculation using Child and Parent
    By SamanthaSamuels in forum Reports
    Replies: 3
    Last Post: 08-17-2010, 11:07 AM
  5. Parent/Child subform
    By Jerry8989 in forum Forms
    Replies: 1
    Last Post: 09-18-2009, 07:27 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