Results 1 to 8 of 8
  1. #1
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108

    Subform Problem

    I have a form that has a subform placed within it. Within that particular subform, there are also three our four seperate subforms.

    Reservation Form
    --Student Data Subform
    ----Subform 1
    ----Subform 2


    ----Subform 3
    ----Subform 4

    When looking at the Student Data Subform on its own, I can complete all the fields without any error messages, and it saves information as it is supposed to (Record 1 Data stored in Record 1, Record 2 Data stored in Record 2....)

    However, when I put the student data subform into the Reservation form, all of my dropdown boxes throw an error about "you are trying to assign a null value..." and records are not stored properly (Record 1 Data and Record 2 Data stored in one single record, not two or three, or however many you need)

    Am I just too many subforms deep? Or do I need to look at my relationships? I have been spending weeks trying to figure this out to no avail. I can post the db online for your viewing (in 2010 format) if that would help.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Does this video on relationships and subforms help you.

    Alan

  3. #3
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108
    Which video? :P

  4. #4
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108
    ha. Wasnt searching with the right words. In bold print from MSDN...

    Access won't let you have a subform within a subform if the data has to be displayed in a continuous form.

    Awesome. Onwards with a new plan...

  5. #5
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Senior Moment. Sorry. But I see, you may already have solved the issue.

    http://www.datapigtechnologies.com/f.../subform2.html

    Alan

  6. #6
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108
    My discovery poses another problem... in the heirchy of subforms I presented earlier, in theory, i could click a button and save all subforms in conjunction with the student subform, and have a clean slate to enter another students information. Now, I am a bit puzzled as to how to approach this given that I can only go one sub-form level deep...

  7. #7
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108
    Looking at the gray region on frmReservation, you will see all the subforms are related in the data that they store for the student entered at the top. I have the relationships built the best I know how, but all the subforms are still acting independently, rather than based on the student subform. There is no codebehind for the buttons below, but you can navigate (in theory) using the buttons on the student subform.

    I must have relatinships setup incorrectly, if you would look them over and point me to the problem, i would greatly appreciate your insight.

  8. #8
    nchesebro's Avatar
    nchesebro is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    108
    Maybe I could place buttons on each subform, and then change them to invisible, then use a button placed on the main form to call the individual buttons on the subform...

    Would that work??? If it would, other than what I have mentioned already, I am not familiar to how to do this in VB and an example would help me get started.

    Thanks

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

Similar Threads

  1. form/subform reference problem
    By dbertanjoli in forum Forms
    Replies: 1
    Last Post: 01-10-2011, 03:31 PM
  2. Form - subform linking problem
    By Justin in forum Access
    Replies: 1
    Last Post: 11-11-2010, 11:21 AM
  3. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  4. Form-Subform-Popup Problem
    By TrudyD1474 in forum Forms
    Replies: 1
    Last Post: 06-10-2010, 05:36 PM
  5. problem with subform
    By dimension in forum Forms
    Replies: 1
    Last Post: 05-28-2009, 05:32 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