On first glance, and by no means a thorough review, I see this sub as a potential problem....
CODE
Private Sub Form_Query()
‘DoCmd.Requery
Me.RecordSource = “SELECT Grades.SSN, Grades.Class_ID, Grades.New_hire,
Grades.Grade, Grades.[Certified?],Grades.Contact, Grades.Change_Date,
Grades.Post_Name, Grades.Notes, Students.L_name, Students.F_name FROM
Students INNER JOIN Grades ON Students.SSN = Grades.SSN ORDER BY
Students.L_name;”
DoCmd.RunCommand acCmdRefresh
End Sub
You Could try this instead...... BE SURE TO BACK UP YOUR CODE.
CODE
Private Sub Form_Query()
Dim myrst As String
myrst = "SELECT Grades.SSN,Grades.Class_ID, Grades.New_hire,Grades.Grade, Grades.[Certified?],Grades.Contact, Grades.Change_Date,Grades.Post_Name, Grades.Notes, Students.L_name, Students.F_name FROM Students INNER JOIN Grades ON Students.SSN = Grades.SSN ORDER BY Students.L_name;"
Me.RecordSource = myrst
Forms![Your Sub Form Name].Requery
End Sub
THIS IS AIR CODED..... you'll likely have to tweak it.
If I'm reading your code correctly, it appears that the following is the trigger for the sub form...... Check your method... there's likely a better way to trigger the sub form. I would use the main form's on change event.
CODE
Private Sub Q0_subform_Enter()
DoCmd.RunCommand acCmdRefresh
End Sub
An example of an onchange event below....
AGAIN AIR CODED.... so you will likely have to tweak for your needs.
CODE
Private Sub Form_DataChange
Set rst = Me.RecordsetClone
rst.FindFirst "Forms![Your Sub Form Name].[Students.SSN] = " & Str(Me![Students.SSN])
If rst.NoMatch Then
MsgBox "No Sub Form records found"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub
Give a few things a try..... BACKUP your code....
Sincerely hopes this helps...... Hopefully some others will chime in on it as well. I'm much better help with having the database open on my screen, but that's not always ideal. However, there are many talented gurus here that should be able to add to my comments and get you going in the right direction.