Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error ’3704’:, How can I come by this?

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Hi out there,

Anyone with who kan give me a tip of what I have done wrong here, since I have a visual basic whitout any documentation.

I have made a dataenvirement like this from one of our databases just like this example. I want to pick out some data from this database but when I presses the OK button in the inputbox the error-message in the bottom of this mesage arrives.

Private Sub cmdFindName_Click()
Dim intWantedNumber As Integer
Dim strFirstname As String
Dim strLastname As String

intWantedNumber = InputBox(prompt:="Write your employee number here", _
Title:="Employeenumber")


deNorthWind.rscmdEmployees.MoveFirst

deNorthWind.rscmdEmployees.Find "EmployeeID=" & intWantedNumber

strFirstname = deNorthWind.rscmdEmployees!FirstName
strLastname = deNorthWind.rscmdEmployees!LastName

End Sub


Run-time error ’3704’:

The operation requested by the application is not allowed if the object is closed


Someone with a tip of how I can solve this?

Regard Hansi
 
Just before the line

deNorthWind.rscmdEmployees.MoveFirst

type in the following line to make a reference to cmdEmployees

deNorthWind.rscmdEmployees

Hope this works for you.

Mark

The key to immortality is to make a big impression in this life!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top