In my specific project, I want all the subform items to populate when a record is made in the master form (I don’t want the user to have to enter any information, other than the record in the master form). I tried using an append query triggered in the form’s On Load event. The append query adds the necessary information to the composite table, but the problem is that the “link field” from the main form needs to populate next to the appended items for the items to display. I tried passing the link field from the main form, but no luck. Any thoughts on how to do this?
For example:
Table 1: tblSports
Table 2 (composite table): tblSportsStats
Table 3: tblSchoolStudents
The main form is Table 1 (Master field: SportID)
The subform is Table 2 (Link field: SportID)
With a lookup of the school student
I want to be able to easily add the school students to the sport (and add more if any other students come) and add additional sports.
My append query is: StudentID from the tblSchoolStudent to the StudentID field in the tblSportsStats
I have the criteria of: Not In ([tblSportsStats]![StudentID])
This prevents me from adding duplicates
But this creates a problem because then I can’t use the query for adding the students when I have another sport (duplicate StudentIDs)
Any ideas? I’m open to using VBA and any other approaches.
Thanks.