I have a form using a connection and command set up in the data environment.
The following code works fine the first time the form is opened. If I unload
the form without doing anything else and then re-open the form I receive
an error 3709 on line 4 stating "Operation is not allowed on an object referencing
a closed or invalid connection." Any ideas??? Thanks in advance!

Private Sub Form_Load()
On Error GoTo ErrorHandler

1: 'Populate the Contract Combo Box
2: dePyramid.cnDocManApp.Open
3: With dePyramid.rscomContracts
4: .Open
5: .MoveFirst
6: Do While .EOF = False
7: cboContract.AddItem !Contract
8: .MoveNext
9: Loop
10: .Close
11: End With
12: dePyramid.cnDocManApp.Close

Exit Sub
Call RecordErrors("frmDocumentLookup", "Form_Load", Erl)
End Sub