By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,435 Members | 2,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,435 IT Pros & Developers. It's quick & easy.

Conversion Problem: Access 2000 to Access 2002

P: n/a
Please excuse my ignorance in this area, being an amateur Access user.

I have an Access 2000 application which runs fine, however when I
convert it to Access 2002 and run it, it comes up with repeated error
messages, as for example in the code below when it reaches the line

rst.Edit

The message is:

Microsoft Visual Basic
Compile Error: Method or data member not found.

What is missing from my conversion?

The code is as follows:

Dim intdummy As Integer
intdummy = tblcheck()
Dim MyDb As Database
Dim rst As Recordset
Set MyDb = CurrentDb
Set rst = MyDb.OpenRecordset("USysSecurity")
'Check if there are any records in the table
If (rst.EOF And rst.BOF) Then
' There are no records in the file
' Create a record for next time
With rst
..AddNew
..Update
End With
Else
' there are records in the file
rst.Edit
etc...
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Don't know anything about Access2002, but I suspect you are missing a
reference to the Microsoft Office Library (In the VB window see
Tools->References)

HTH

Phil
"John Furphy" <jo********@a1.com.au> wrote in message
news:4c**************************@posting.google.c om...
Please excuse my ignorance in this area, being an amateur Access user.

I have an Access 2000 application which runs fine, however when I
convert it to Access 2002 and run it, it comes up with repeated error
messages, as for example in the code below when it reaches the line

rst.Edit

The message is:

Microsoft Visual Basic
Compile Error: Method or data member not found.

What is missing from my conversion?

The code is as follows:

Dim intdummy As Integer
intdummy = tblcheck()
Dim MyDb As Database
Dim rst As Recordset
Set MyDb = CurrentDb
Set rst = MyDb.OpenRecordset("USysSecurity")
'Check if there are any records in the table
If (rst.EOF And rst.BOF) Then
' There are no records in the file
' Create a record for next time
With rst
.AddNew
.Update
End With
Else
' there are records in the file
rst.Edit
etc...

Nov 13 '05 #2

P: n/a
jo********@a1.com.au (John Furphy) wrote:
Please excuse my ignorance in this area, being an amateur Access user.

I have an Access 2000 application which runs fine, however when I
convert it to Access 2002 and run it, it comes up with repeated error
messages, as for example in the code below when it reaches the line

rst.Edit

The message is:

Microsoft Visual Basic
Compile Error: Method or data member not found.


You are very likely missing the DAO reference from the A2002 version. Or it's lower
in the references priority than the ADO reference. Locate the Microsoft DAO 3.6
Object Library reference and place it above the Microsoft ActiveX Data Objects 2.5
Library.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #3

P: n/a
I guessing, but I believe that a missing reference or the order of the
References may be the problem. Try changing:

Dim rst As Recordset

to

Dim rst as DAO.Recordset

That should explicitly grab the appropriate references. If this does
not work, go to the "Tools - References" menu item in the VBA Window
and see if there are any missing references.

Let us know if anything works!

Jim
Nov 13 '05 #4

P: n/a
Phil,

I already had Visual Basic for Applications and the Microsoft Access
11.0 Object Library selected in the References.

I added in the Microsoft Office 11.0 Object Library, but the problem
still occurs.

I'm sure you are correct that I'm missing a reference, but which one?

John Furphy

"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<41*********************@mercury.nildram.net> ...
Don't know anything about Access2002, but I suspect you are missing a
reference to the Microsoft Office Library (In the VB window see
Tools->References)

HTH

Phil
"John Furphy" <jo********@a1.com.au> wrote in message
news:4c**************************@posting.google.c om...
Please excuse my ignorance in this area, being an amateur Access user.

I have an Access 2000 application which runs fine, however when I
convert it to Access 2002 and run it, it comes up with repeated error
messages, as for example in the code below when it reaches the line

rst.Edit

The message is:

Microsoft Visual Basic
Compile Error: Method or data member not found.

What is missing from my conversion?

The code is as follows:

Dim intdummy As Integer
intdummy = tblcheck()
Dim MyDb As Database
Dim rst As Recordset
Set MyDb = CurrentDb
Set rst = MyDb.OpenRecordset("USysSecurity")
'Check if there are any records in the table
If (rst.EOF And rst.BOF) Then
' There are no records in the file
' Create a record for next time
With rst
.AddNew
.Update
End With
Else
' there are records in the file
rst.Edit
etc...

Nov 13 '05 #5

P: n/a
Thanks, the problem is now fixed, and it was either missing
references, or references in the wrong order. For anyone with a smilar
problem, the following references work for me in the order listed:

Visual Basic for Applications
Microsoft Office 11.00 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.7 Library

Thanks.

John Furphy
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.