Results 1 to 11 of 11
  1. #1
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73

    One to many (BookingID) not replicating to other tables

    Attached is the db.

    tblBookings.BookingID is not being replicated to tblBookingDetails.BookingID

    Other future tables (tblRooms) will also need this BookingID?

    Many customers book several times a year and use different products.

    Not much different than a sales database showing customer purchases (lifetime history).

    Thanks
    Attached Files Attached Files

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Foreign keys are not populated in tables where they exist unless you do it or are using a Form/SubForm and it is the LinkMaster/ChildField of the SubFormControl.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    Use form/subform arrangement. Review http://office.microsoft.com/en-us/ac...010098674.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    I have two subforms (tabs) and may have more in the future.

    So far I can only get one subform to work properly and tried numerous times.

    Thanks

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    The posted db did not show form/subform arrangement. If you want us to analyse your effort, provide that version.

    Have you set the Master/Child links properties of the subform container control?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have that ForeignKey as your LinkMaster/ChildFields entry?

  7. #7
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    Sorry ... I thought that version I sent had the two subforms.

    Main Form: frmCustomers
    Sub Form: frmBookings
    Sub Form: frmBookingDetails

    Each customer will always have the same CustID but that customer may book several times per year.

    CustID gets populated in the tblBookings from the main form no problem there.

    This is where my problem is ... because there is no option available to link (subform) frmBookings.BookingID with (subform) frmBookingDetails.BookingID.

    LinkMaster/ChildFields only point to the main form (frmCustomers) on frmBookingDetails.

    I will have another table (tblRooms) that will most likely need the BookingID as well.

    Thanks

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    Sorry, the form/subform arrangement was there, was just too tired I guess.

    Forms can be nested up to about 7 levels. So form/subform/subsubform could be

    frmCustomers/frmBookings/frmBookingDetails.

    Only the bottom form can be continuous or datasheet view, all higher levels would be single view.

    Linking Bookings and BookingDetails side-by-side requires a special technique. Review http://www.fmsinc.com/MicrosoftAcces...edSubforms.asp
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    I will try that again ... and hoping that the value will be entered in the table (tblBookingDetails) and not just visible on the form (frmBookingDetails).

    I gave that a try before and was stuck.

    Thanks

  10. #10
    Dega is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    June 7,

    That technique worked after getting the propert syntax correct ... thanks.

    I have a few more forms to deal with and have included another version of the db (attached).

    Issue: Some forms not populating with values. (below)

    1) tblBookingDetails Subform
    RoomID


    Not certain how to go about this with the one-to-many relationships I have defined.

    tblTours is being used for a query ...

    Thanks for your help.
    Attached Files Attached Files

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    1) Where should it update from? Don't you have to enter a RoomID? Why is there a subform for tblRooms?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  2. Replies: 10
    Last Post: 07-12-2011, 11:09 PM
  3. access replicating itself
    By tintincute in forum Access
    Replies: 3
    Last Post: 09-08-2010, 12:49 PM
  4. Replicated New Tables Not Replicating Data
    By smyers in forum Access
    Replies: 0
    Last Post: 04-30-2010, 01:12 PM
  5. Joining tables two tables and another table that is not
    By DevintheDude in forum Database Design
    Replies: 0
    Last Post: 09-12-2007, 08:56 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