473,786 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Method Not Found, Access 97/2000 Conversion

Cy
Hello Fellow New Group Folks,

Here's today's problem. I was called in to help convert an Access 97
database to Access 2000. 99% of all my Access Dev. work has occurred
in 2000, so I know very little about 97, however, from everything I
read, it sounded like a conversion from 97 to 2000 should go smoothly.
Boy was I wrong.

Here's what we got. There is a form, that lists a group of employees.
There is a command button, that when pressed, is supposed to go out and
see if there are any "results" for this particular employee. If there
isn't any results, it is supposed to prompt the user to see if they'd
like to add a result at that time. Works great in 97. Gives a method
not found. I looked at the code, with no avail. Here is the code.

*************** *************** *************** *************** *************** *************** *************** **
Private Sub Results_Click()
On Error GoTo results_err
Dim a, mers As Recordset, f As Form
Dim mydb As Database, resrs As Recordset
If Me.Dirty Then DoCmd.DoMenuIte m 0, 0, 4
Select Case Me!stype
Case 2:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-alcohol")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
Me!Positive = alcres("results-alcohol")
DoCmd.Close acForm, "results-alcohol"
End If
Else
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
If Forms.[results-alcohol].cpos Then Me!Positive = 1 Else
Me!Positive = 2
DoCmd.Close acForm, "results-alcohol"
End If
Case 3:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-drug")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If Pos("drug result") Then mers.Positive = 1 Else mers.Positive
= 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
Else
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If mers.Positive < 3 And Pos("drug result") Then mers.Positive =
1 Else If mers.Positive < 3 Then mers.Positive = 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
End Select

Me.Refresh
results_cont:
DoCmd.SetWarnin gs True: DoCmd.Hourglass False
Exit Sub
results_err:
If Err = 3260 Then
MsgBox "This data is currently locked out. Hit Enter to try again"
DoEvents
Resume
End If

msgdisp
GoTo results_cont
End Sub
*************** *************** *************** *************** *************** *************** ***************

It fails on this line, so far.
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
What I don't understand is what "method" in 97 is res_no? I was
thinking that the brackets would indicate that it is a field, but there
is no object in the database with that name.

I also know that it fails on this lines as well:
resrs.date_rept rcv = date
and what is date_reptrcv

Any help would be appreciated. If anyone has a utility or something
that helps sift thru this code and made recommendations for changes,
that is helpful also.

No matter what, this group has always been good to help out. Any help
is appreciated.

Jan 27 '06 #1
12 2263
Br
Have you checked the code references?

Cy wrote:
Hello Fellow New Group Folks,

Here's today's problem. I was called in to help convert an Access 97
database to Access 2000. 99% of all my Access Dev. work has occurred
in 2000, so I know very little about 97, however, from everything I
read, it sounded like a conversion from 97 to 2000 should go smoothly.
Boy was I wrong.

Here's what we got. There is a form, that lists a group of employees.
There is a command button, that when pressed, is supposed to go out
and see if there are any "results" for this particular employee. If
there isn't any results, it is supposed to prompt the user to see if
they'd like to add a result at that time. Works great in 97. Gives
a method not found. I looked at the code, with no avail. Here is
the code.

*************** *************** *************** *************** *************** *************** *************** **
Private Sub Results_Click()
On Error GoTo results_err
Dim a, mers As Recordset, f As Form
Dim mydb As Database, resrs As Recordset
If Me.Dirty Then DoCmd.DoMenuIte m 0, 0, 4
Select Case Me!stype
Case 2:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-alcohol")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
Me!Positive = alcres("results-alcohol")
DoCmd.Close acForm, "results-alcohol"
End If
Else
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
If Forms.[results-alcohol].cpos Then Me!Positive = 1 Else
Me!Positive = 2
DoCmd.Close acForm, "results-alcohol"
End If
Case 3:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-drug")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If Pos("drug result") Then mers.Positive = 1 Else mers.Positive
= 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
Else
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If mers.Positive < 3 And Pos("drug result") Then mers.Positive =
1 Else If mers.Positive < 3 Then mers.Positive = 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
End Select

Me.Refresh
results_cont:
DoCmd.SetWarnin gs True: DoCmd.Hourglass False
Exit Sub
results_err:
If Err = 3260 Then
MsgBox "This data is currently locked out. Hit Enter to try again"
DoEvents
Resume
End If

msgdisp
GoTo results_cont
End Sub
*************** *************** *************** *************** *************** *************** ***************

It fails on this line, so far.
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
What I don't understand is what "method" in 97 is res_no? I was
thinking that the brackets would indicate that it is a field, but
there is no object in the database with that name.

I also know that it fails on this lines as well:
resrs.date_rept rcv = date
and what is date_reptrcv

Any help would be appreciated. If anyone has a utility or something
that helps sift thru this code and made recommendations for changes,
that is helpful also.

No matter what, this group has always been good to help out. Any help
is appreciated.


--
regards,

Br@dley
Jan 27 '06 #2
Cy
If you are referring to Tools, Reference? Yes. It has DAO 3.6
checked. I did a comparison from the 97 to 2000 and they look the same.

Jan 27 '06 #3
On 26 Jan 2006 16:18:49 -0800, "Cy" <go********@com putunity.com> wrote:
Hello Fellow New Group Folks,

Here's today's problem. I was called in to help convert an Access 97
database to Access 2000. 99% of all my Access Dev. work has occurred
in 2000, so I know very little about 97, however, from everything I
read, it sounded like a conversion from 97 to 2000 should go smoothly.
Boy was I wrong.

Here's what we got. There is a form, that lists a group of employees.
There is a command button, that when pressed, is supposed to go out and
see if there are any "results" for this particular employee. If there
isn't any results, it is supposed to prompt the user to see if they'd
like to add a result at that time. Works great in 97. Gives a method
not found. I looked at the code, with no avail. Here is the code.

************** *************** *************** *************** *************** *************** *************** ***
Private Sub Results_Click()
On Error GoTo results_err
Dim a, mers As Recordset, f As Form
Dim mydb As Database, resrs As Recordset
If Me.Dirty Then DoCmd.DoMenuIte m 0, 0, 4
Select Case Me!stype
Case 2:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-alcohol")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
Me!Positive = alcres("results-alcohol")
DoCmd.Close acForm, "results-alcohol"
End If
Else
DoCmd.OpenForm "results-alcohol", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
If Forms.[results-alcohol].cpos Then Me!Positive = 1 Else
Me!Positive = 2
DoCmd.Close acForm, "results-alcohol"
End If
Case 3:
Set mers = Me.RecordsetClo ne
mers.Bookmark = Me.Bookmark
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
a = MsgBox("There are no results yet for this appointment. Do
you wish to add some?", 36, "No results yet")
If a = 6 Then
Set mydb = CurrentDb
Set resrs = mydb.OpenRecord set("result-drug")
resrs.AddNew
resrs.date_rept rcv = date
mers.Edit
mers.[res_no] = resrs.result_no
mers.Update
resrs.Update
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If Pos("drug result") Then mers.Positive = 1 Else mers.Positive
= 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
Else
DoCmd.OpenForm "drug result", , , "[result_no] = " &
CStr(mers.[res_no]), , acDialog
mers.Edit
If mers.Positive < 3 And Pos("drug result") Then mers.Positive =
1 Else If mers.Positive < 3 Then mers.Positive = 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True
mers.Update
DoCmd.Close acForm, "drug result"
End If
End Select

Me.Refresh
results_cont :
DoCmd.SetWarnin gs True: DoCmd.Hourglass False
Exit Sub
results_err:
If Err = 3260 Then
MsgBox "This data is currently locked out. Hit Enter to try again"
DoEvents
Resume
End If

msgdisp
GoTo results_cont
End Sub
************** *************** *************** *************** *************** *************** *************** *

It fails on this line, so far.
If IsNull(mers.[res_no]) Or mers.[res_no] = 0 Then
What I don't understand is what "method" in 97 is res_no? I was
thinking that the brackets would indicate that it is a field, but there
is no object in the database with that name.

I also know that it fails on this lines as well:
resrs.date_rept rcv = date
and what is date_reptrcv

Any help would be appreciated. If anyone has a utility or something
that helps sift thru this code and made recommendations for changes,
that is helpful also.

No matter what, this group has always been good to help out. Any help
is appreciated.


Things to check -

Any missing references?

Make sure a reference is set to the DAO 3.6 Object Library.

If this is a completed database with no future expansions expected, remove the reference to Active x Data Objects (ADO).

If it possible that there will be further work done on the database, leave the reference to ADO but put the DAO 3.6
reference above it in the reference list. (higher priority).
You should also then specifically qualify any recordsets dimmed in the database as DAO.Recordset. This is because
recordsets are a member of both the DAO and ADO object libraries. If the variables aren't qualified the library with the
highest priority will be used. This is the likely cause of yoour problems.

You can do a Find/Replace on the current project to replace all instances of "As Recordset" with "As DAO.Recordet".
Wayne Gillespie
Gosford NSW Australia
Jan 27 '06 #4
Cy
Wayne,

Thanks. I have already moved the DAO up in the list. I did also, just
minutes ago, added the dao.recordset, but no luck.

Any other ideas?

Jan 27 '06 #5
Br
Cy wrote:
If you are referring to Tools, Reference? Yes. It has DAO 3.6
checked. I did a comparison from the 97 to 2000 and they look the
same.
I should have read it more closely....
If IsNull(mers.[res_no]) Or mers.[res_no] = 0


Should be...

If IsNull(mers![res_no]) Or mers![res_no] = 0

Newer versions of Access are stricter on the use of the operators. The Dot
operator is for methods, not fields. (Hence, the "method not found" error)
--
regards,

Br@dley
Jan 27 '06 #6
Make sure you change all of your DAO declarations to include the DAO part of
the statement, this would go for ALL recordsets, database, querydef, and
field definitions, plus some others. The Recordset one is the most critical
and common.

Next, if you've done that and you've check the reference for the DAO 3.6
Object Library, there may be another reference that is broken. A broken
reference can cause problems with items that have nothing to do with the
broken reference. For more information of check for this and fixing it, see
this page:

http://www.allenbrowne.com/ser-38.html

--
Wayne Morgan
MS Access MVP
"Cy" <go********@com putunity.com> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
Wayne,

Thanks. I have already moved the DAO up in the list. I did also, just
minutes ago, added the dao.recordset, but no luck.

Any other ideas?

Jan 27 '06 #7
Cy
Thanks for you help...
I was able to correct all the problems, but one now...

If mers!Positive < 3 And Pos("drug result") Then mers!Positive =
1 Else If mers!Positive < 3 Then mers.Positive = 2
If susp("drug result") Or (mers.Positive = 1) Then mers.mro =
False Else mers.mro = True

else if mers!positive < 3 gives me a method or data member not
found...thought s?

Jan 27 '06 #8
Cy
Never mind, figured it out.

Thank you very much for your help

Jan 27 '06 #9
Cy
Wayne, much appreciated.

Jan 27 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
2908
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I knew db's and gave me long list of things to do with that particular database, first thing being that particular conversion. Truth is that I don't know a first thing about db's, let alone using mysql... I downloaded mysql form www.mysql.com and...
27
3645
by: Chuck Grimsby | last post by:
(Repost, due to lack of submissions...) The Microsoft Access Product Group (the people who build Microsoft Access) want your help! One of the main things we're working on for the near future is a conversion tool to take Microsoft Access 97 databases (primarily, but also Microsoft Access 2000 or 2002/XP databases) up to Microsoft Office Access 2003. For us to do this, we need sample databases from *you*, our customers, to ensure a...
2
1661
by: bala | last post by:
hi access gurus would appreciate if u can give me pointers regarding conversion of ms access 97 application to ms access 2000, like what are the problems to be expected and how to handle it. also would appreciate if anyone can give pointers on using VSS with ms access 2000, how to handle multiuser issues when it comes to insert, update and delete.
3
7227
by: Derek Riley | last post by:
I have been using Access97 for some time now and decided to upgrade to 2000, the problem is when I convert it to 2000 I get the following message "There were compilation errors during the conversion" it looks like it is due to the DAO 2.5/3.5 reference. Is there a conversion utility that I can run to convert it to DAO 3.6 to run in Access 2000 There seems to be a lot of changes required in the module where it is using
0
4049
by: Jim M | last post by:
For about a year and a half now I have been working in Access 2002 at home and converting to Access 2000 for work (I need both versions). I made a few changes to forms and queries then converted to Access 2000 a (as I had done many times before). After this last conversion I tried to open the database in Access 2000 and got the following error when I tried to open the Access 2000 database from Access 2000. "Microsoft Access was unable to...
35
3227
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 = 2,048,000k Let's say on average each record in the database consumes 15k 2,048,000/15 = 136,533 records
13
4447
by: Greg Strong | last post by:
Hello All, Hello All, What are the ToDo's / Gotchas to convert an MDB Access 2K2 database to an Access Project (i.e. ADP) file for the front end using Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) for the back end? Now for the background. I have a prototype MDB file that was built in Access 2K2, and compiled in Access 2K to provide backward
18
4750
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the class where only the "searched" property has a value. I expected to get the index into the arraylist where I could then get the entire class instance. However, the 'indexof' is never calling my overloaded, overrides Equals method. Here is the...
0
1094
by: ncsthbell | last post by:
I have an access app that is in version 2000. We are upgrading to 2007 and I have made all the changes for the 2000 app to run under 2007 in Runtime Access. This app is basically a 'skeleton' in which the users grab a copy and load with data for an account. Therefore, each account is a separate .mdb. My dilema is that once we upgrade to 2007, I need to handle the accounts they have open still in the old 2000 app version... they will not run...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.