2 Replies - 4390 Views - Last Post: 08 November 2009 - 05:19 PM Rate Topic: -----

#1 samsonawane  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-October 09

run time error 5 :invalid procedure and call argument

Posted 05 November 2009 - 02:34 AM

hi everyone this is sam
when run my application through exe that generates error something like "run time error 5 Invalid procedure and call argument" could anyone tell me what is this error and when this error occurs i am sending the code below:
Private Sub txtstdid_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
ElseIf txtstdid.Text = "S" Then
MsgBox "Please insert student ID"
Else
Dim sql As String
sql = "select * from student_details"
		r.Open sql, c, 3, 3
		Do While r.EOF = False
			 If Trim(r!std_id) = Trim(txtstdid.Text) Then
				 MsgBox "This ID is exist you can not add this ID"
				 mode = 1
				 Exit Do
			  End If
		 r.MoveNext
		 Loop
		 r.Close
	If mode = 0 Then
	 MsgBox "student Record does not exist if you want to add record fill all the information and click on add"
	  txtfname.SetFocus
	End If
End If
End Sub

********************************************************
i could not found the error line it generates error when i runs an exe of the project. i am sending attachment file of full code that is stderror.txt
please help me

Attached File(s)


This post has been edited by samsonawane: 05 November 2009 - 07:56 AM


Is This A Good Question/Topic? 0
  • +

Replies To: run time error 5 :invalid procedure and call argument

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: run time error 5 :invalid procedure and call argument

Posted 05 November 2009 - 02:48 AM

hi there :)

can you show us on witch row is the error :)
Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: run time error 5 :invalid procedure and call argument

Posted 08 November 2009 - 05:19 PM

you should declare the record set like this
Dim r As New ADODB.Recordset
Dim c As New ADODB.Connection



i think this would solve your problem
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1