-
Connection Errors (Simple)
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
ErrorHandler:
Call RecordErrors("frmDocumentLookup", "Form_Load", Erl)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks