In the following code, when I close the Emails RecordSet I get an error saying
Operation not allowed when the object is closed
... why do I need to close the Leagues RecordSet (after a SELECT) but not the Emails RecordSet (after an UPDATE) ?!?
Call ConnectToDatabase
SQLstr = "SELECT [Id],[Name],[Session] From [Leagues] "
SQLstr = SQLstr & "WHERE Leagues.[Name] = '" & UCase(KAleague) & "';"
KA_RS_Leagues.Open SQLstr, KA_DB, adOpenDynamic, adLockOptimistic
SQLstr = "UPDATE Emails SET FixtureList = 1 "
SQLstr = SQLstr & "WHERE Emails.League = '" & KA_RS_Leagues!ID & "';"
KA_RS_Emails.Open SQLstr, KA_DB, adOpenDynamic, adLockOptimistic
KA_RS_Leagues.Close
KA_RS_Emails.Close <<< Error occurs here