I don't know if it works, but try setting it to nothing first:

Code:
Set rstDetail = Nothing