You are using DAO, so I re-wrote the sub.....
You turned off warnings, but didn't turn them on again. When the sub ends, warnings should automatically be turned on again, but I never use "Set Warnings off" so I'm not really sure.
Using the EXECUTE method bypasses the Access SQL interpreter and is faster and doesn't require you to set warnings off.
Code:
Private Sub btn_Classes_by_Date_Click()
Dim dB As DAO.Database
Dim strSQL As String
Set dB = CurrentDb
strSQL = "DELETE * FROM Scheduled_For"
dB.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO Scheduled_For(MRN,Patient_Name,Surgery_Date,Scheduled_For,Enrolled_Date) "
strSQL = strSQL & " SELECT MRN,Patient_Name,Surgery_Date,Scheduled_For,Enrolled_Date "
strSQL = strSQL & " FROM Total_Joint_Readiness "
strSQL = strSQL & " WHERE Scheduled_For >= #" & Me!beginDate & "# AND Scheduled_For <= #" & Me!endDate & "# ;"
' I would think about using the following
' strSQL = strSQL & " WHERE Scheduled_For Between #" & Me!beginDate & "# AND #" & Me!endDate & "# ;"
' Debug.Print strSQL
dB.Execute strSQL, dbFailOnError
DoCmd.OpenQuery "Classes_By_Date", , acReadOnly
Set dB = Nothing
End Sub
Just a suggestion........