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
.ConnectionString = Connection = "provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BCS1;Data Source=DEEPAK"
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
Public Function Share(ByVal M)
If rsst4 = True Then
Share = CInt(0)
am1 = rs14.Fields(8).Value
Share = CInt(am1)
Calling in report:-
a = Module4.Share(M)
but when runing it show us this error
Run time error 3265
Item can not be found in the collection of corresponiding.........
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: