I had the same problem that Neal Groeling had with the Attendance sub-form. When I tried relating the sub-form in the Link Master Fields, I got an error message "Can't build a link between unbound forms."
My work around was to add a criteria to the Attendance Query [ClassID] =[Forms]![frmAttendance]![ClassID], which seemed to fix it - for anyone having the same problem.
I am curious if this error may be related to my version of Access (MSO 2021), or if I may be missing something that caused the error to begin with?
Interesting. Possibly. Can you tell me what lesson and time index this happens? I'll try to recreate it with the latest version of Access and see if it's an issue. So far it looks like it's just the two of you (and this video is many years old by now).
John EasonOP
@Reply 2 years ago
Student Attendance 2
16:20 Addition of ClassID to the AttendanceQ to form the relationship between the subform and form
17:25 Addition of Attendance sub-form to Attendance Form
That linked the subform for you, and apparently most people, but not for me and Neal. Being good and attentive students, we both went to the property data tab to check that the "Link Master Fields" property was set to the ClassID, but we got the same error message about the "unbound form" when trying to update it.
One update on my fix - I had to cut and paste the [Forms]![frmAttendance]![ClassID] criteria from the AttendanceQ to the AttendanceDateQ while working on the Student Attendance 3 lesson to keep it from interfering with the command buttons added in that lesson. With that change, everything works perfectly.
Yeah, that's weird, and without recreating those databases and trying to run through all this again, I really don't know exactly why that's happening. Although I can say that when you're building subforms where either the child or the parent is based on a query, the chances of it not automatically linking up properly are greatly increased. So, as long as you've got it working, then that's what really matters. Just keep that in mind moving forward. It's kind of like when you make a relational combo box; if the data set is based on a query, you don't get some options like automatically hiding the ID field - it's just because it's based on a query.
Rod Nyberg
@Reply 2 years ago
Hi John- thank you for posting this issue and I was racking my brain for most the day trying to figure out. So Richard, both John and Neal explained it well but just from a more novice point of view, the issue I noted was that in Lesson 15.02 (Student Attendance 2). When you open the ClassF form and then selected the Attendance button, you get ALL students in the AttendanceT instead of what the record selected for ClassF is on. For example, in my case, my class ID should have only two records but all nine records displayed when selecting the Attendance button that was built using the AttendanceTodayQ.
I think the reason it was not noticed in the video was that only one class was used for the data set. So I kept trying to figure out why it was not linked to the ClassID when viewing the subform. I finally realized I needed some sort of filter on the AttendanceTodayQ. That's when I went to the comments on this lesson and I tried John Eason's filter in my AttendanceTodayQ and that seems to work. Thanks all!
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 15.