Results 1 to 2 of 2
  1. #1
    ZJGMoparman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24

    Form and Subform relationship

    I have created a flight log database to keep up with my R/C flights. I have one form to enter a flight session and then a flight form to enter new flights. The flights table has a field for SessionID which is related to the SessionID in the Session table. I have a button in the session form to add a new flight. The problem is, when I add the flight, it does not assign the same sessionID that is open to the flight. How can i make it default to the current sessionID of the corresponding form i have open. I am attaching a link to download the database, if that will help things out. I am still new to access. Maybe someone could also give me some pointers on what I have so far and let me know what i have done wrong. I am trying to learn, so any help is appreciated.

    http://d01.megashares.com/dl/S8sOK3A/Flight%20Log.accdb

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Do you want more than one aircraft associated with a session?

    Instead of opening another form and trying to pass the SessionID to it, why don't you just enter the flight info in the subform? Master/Child links of the subform container control will synchronize the related records and the SessionID will automatically save to the flight record. Just click into any field of the New record row of the Flight subform to start new record, the command button not needed. Use the setup you have for FlightF form as the subform.

    Are you the only user of this database? If you set it up properly and learn to use the intrinsic navigation tools, can be built without any code at all.
    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. Form/Subform relationship help
    By bkirsch in forum Forms
    Replies: 13
    Last Post: 01-27-2012, 01:24 PM
  2. Form/Subform relationship
    By justhininabouti in forum Forms
    Replies: 2
    Last Post: 11-28-2011, 09:07 PM
  3. relationship issue or filter by subform?
    By flwrgrl in forum Forms
    Replies: 9
    Last Post: 07-14-2011, 02:07 PM
  4. Replies: 3
    Last Post: 02-05-2010, 10:10 AM
  5. Replies: 0
    Last Post: 02-16-2006, 09:11 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