Run time error 3265 VB6.0/SQL2005

40 pts.
Tags:
SQL 2005
SQL 2005 Database
Visual Basic 6
I am making a report inwhich i want to insert some values from a diffrent Table ( By making a module) Coding of Module is:- Public Function Deposit(ByVal M) Set conn14 = New Connection Set rs14 = New Recordset With conn14 .ConnectionString = Connection = "provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BCS1;Data Source=DEEPAK" .Open End With rs14.CursorLocation = adUseClient rs14.Open "select * from Deposits where Recipt_No=(select Max(Recipt_No)from Deposits where MS_NO='" & M & "')", conn14, adOpenDynamic, adLockBatchOptimistic '   If rs14.EOF Or rs12.BOF Then    rsst4 = True     rs14.Close End If End Function Public Function Share(ByVal M) If rsst4 = True Then Share = CInt(0) Else       am1 = rs14.Fields(8).Value             Share = CInt(am1)       End If End Function Calling in report:- a = Module4.Share(M)              MsgBox a but when runing it show us this error Run time error 3265 Item can not be found in the collection of corresponiding.........

Software/Hardware used:
Windows XP C2d processor

Answer Wiki

Thanks. We'll let you know when a new response is added.

Thanks for Reply Your suggestion resolved my problem
Thank you again

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DEEPSOFT
    I am making a report inwhich i want to insert some values from a diffrent Table ( By making a module), Coding of Module is:-, Public Function Deposit(ByVal M), Set conn14 = New Connection, Set rs14 = New Recordset, With conn14, .ConnectionString = Connection = "provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BCS1;Data Source=DEEPAK", .Open, End With, rs14.CursorLocation = adUseClient, rs14.Open "select * from Deposits where Recipt_No=(select Max(Recipt_No)from Deposits where MS_NO='" & M & "')", conn14, adOpenDynamic, adLockBatchOptimistic, ' If rs14.EOF Or rs12.BOF Then, rsst4 = True, rs14.Close, End If, End Function, Public Function Share(ByVal M), If rsst4 = True Then, Share = CInt(0), Else, am1 = rs14.Fields(8).Value, Share = CInt(am1), End If, End Function, Calling in report:-, a = Module4.Share(M), MsgBox a, but when runing it show us this error, Run time error 3265, Item can not be found in the collection of corresponiding.........a
    40 pointsBadges:
    report
  • carlosdl
    Have you debugged the application ? The first step should be to identify the line of code that is causing the error. Also, I would recommend posting the complete error message.
    70,200 pointsBadges:
    report
  • DEEPSOFT
    I am making a report inwhich i want to insert some values from a diffrent Table ( By making a module) Coding of Module is:- Public Function Deposit(ByVal M) Set conn14 = New Connection Set rs14 = New Recordset With conn14 .ConnectionString = Connection = "provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BCS1;Data Source=DEEPAK" .Open End With rs14.CursorLocation = adUseClient rs14.Open "select * from Deposits where Recipt_No=(select Max(Recipt_No)from Deposits where MS_NO='" & M & "')", conn14, adOpenDynamic, adLockBatchOptimistic ' If rs14.EOF Or rs12.BOF Then rsst4 = True rs14.Close End If End Function Public Function Share(ByVal M) If rsst4 = True Then Share = CInt(0) Else am1 = rs14.Fields(8).Value Share = CInt(am1) End If End Function Calling in report:- a = Module4.Share(M) ‘ERROR is in this line MsgBox a Complete Message Run Time Error '3265' Item cannot be found in the collection of corresponding to the requested Name and Ordinal.
    40 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following