Click here to Skip to main content
15,904,926 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am a beginner in vb6
when i run the application ,i got error message like that
Compile error 'Method or data member not found&'

My Code is here
Dim i As Integer
Dim C As Integer
Dim Rsw As DAO.Recordset
Dim rs As DAO.Recordset


gTkeyCnt = 0
gTWrdCnt = 0

On Error GoTo er

Set db = OpenDatabase("", True, False, gsConnDAO)
Set rs = db.OpenRecordSet("Select * from TestKey")
Set Rsw = db.OpenRecordSet(" Select * from NumbersToWords")
If Not rs.Eof() Then
   rs.MoveLast
   gTkeyCnt = rs.RecordCount
   rs.MoveFirst
End If


[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 27-Mar-11 21:15pm
v2
Comments
OriginalGriff 28-Mar-11 3:16am    
Any particular line, or should we just guess?
Sergey Alexandrovich Kryukov 28-Mar-11 3:30am    
No, you did not report the error message. It should also show a name of the missing member and identify the code line number.
--SA

If you really want to get good help, you must be very accurate in reporting errors: you should report the exact error message that is usually pretty informative.
Hence, plese, modify the original post, including the missing bits.
:-)
 
Share this answer
 
The problem is simple just add this reference to your project:
Microsoft DAO 3.51 Object Liprary
to add a reference to your project click in Project menu and choose References
I hope this can help you!
 
Share this answer
 
Comments
Muthu kumar246 2-Jan-13 8:35am    
I'm Receiving the same error,When i run my application,"Compile Error:Method or datamember not found" in Windows7 OS.If i run the same program in Windows XP. It works,May i know What's The reason Behind this problem....Please Clear ASAP.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900