473,473 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

When converting access 2000 --> 97 my addnew wont work

18 New Member
Hi i Know this looks weird by i done a database in 2000 all worked well than i had to convert it to 97. I had to redo all my code that was fine but i can not get the form to addnew when OnOpen runs just won`t except it

In access 2000 all i needed was recordset.addnew how do you do this in 97 ???

Thankyou for any help
Jan 2 '07 #1
10 1941
NeoPa
32,556 Recognized Expert Moderator MVP
What library are you using for Access 97.
Have you checked that it's Reference has been added in the VBA window?
Jan 3 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi i Know this looks weird by i done a database in 2000 all worked well than i had to convert it to 97. I had to redo all my code that was fine but i can not get the form to addnew when OnOpen runs just won`t except it

In access 2000 all i needed was recordset.addnew how do you do this in 97 ???

Thankyou for any help
You shouldn't have had to redo all your code. How did you do the converstion. The way to do it is while in 2000 convert to previous version. Then open in '97 and allow it to convert to current version. Then you should open the vba editor and compile the code and as Ade (NeoPa) says you should check that there are no missing libraries from the library list.

Mary
Jan 3 '07 #3
powelly
18 New Member
My code is there but does not seem compatable with 97
Eg. this error, run time error '424':
Object Required

[code]
Private Sub Form_Open(Cancel As Integer)
Recordset.AddNew
End Sub
[code]

I Have Found 1 (Microsoft Access 10.0 Object Library) missing which won`t let me put it in because name conflicts with existing module,project,or object library.
There is one older version (Microsoft Access 8.0 Object Library)
how do i fix it??
Jan 3 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
My code is there but does not seem compatable with 97
Eg. this error, run time error '424':
Object Required

[code]
Private Sub Form_Open(Cancel As Integer)
Recordset.AddNew
End Sub
[code]

I Have Found 1 (Microsoft Access 10.0 Object Library) missing which won`t let me put it in because name conflicts with existing module,project,or object library.
There is one older version (Microsoft Access 8.0 Object Library)
how do i fix it??
You need to replace the Microsoft Access 10.0 with the 8.0 library. Just unclick the 10.0 and tick the 8.0 instead. This should solve the problems with incompatible code.

Mary
Jan 3 '07 #5
powelly
18 New Member
there is only 1 of the objects library in 97(ver 8) or 2000 (ver 10.0)
I can`t untick either--> Error (Microsoft Access Needs this reference in order to work properly)
I can not install the one missing won`t let me even tryed replacing and renaming the files but did not work only played up and said file was missing.

the main errors are
1. Compile Error :
Method or Data member not found
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo33_AfterUpdate()
  2.    Dim rs As Object
  3.     Set rs = Me.Recordset.Clone  --------------------------Gives Error
  4.     rs.FindFirst "[ID] = " & Str(Nz(Me![Combo33], 0))
  5.     If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  6. End Sub
I have fixed error about OnOpen recordset.addnew

I had to do this seems to work so far
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     If Dirty Then
  3.         Recordset.AddNew
  4.     End If
  5. End Sub
Jan 3 '07 #6
MMcCarthy
14,534 Recognized Expert Moderator MVP
You are only going to continue to have problems unless you can get the correct library working.

My best suggestion is to create a new '97 database and import all objects. Hopefully this will solve the problem.

Mary
Jan 3 '07 #7
NeoPa
32,556 Recognized Expert Moderator MVP
there is only 1 of the objects library in 97(ver 8) or 2000 (ver 10.0)
I can`t untick either--> Error (Microsoft Access Needs this reference in order to work properly)
I can not install the one missing won`t let me even tryed replacing and renaming the files but did not work only played up and said file was missing.

the main errors are
1. Compile Error :
Method or Data member not found
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo33_AfterUpdate()
  2.    Dim rs As Object
  3.     Set rs = Me.Recordset.Clone  --------------------------Gives Error
  4.     rs.FindFirst "[ID] = " & Str(Nz(Me![Combo33], 0))
  5.     If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  6. End Sub
I have fixed error about OnOpen recordset.addnew

I had to do this seems to work so far
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     If Dirty Then
  3.         Recordset.AddNew
  4.     End If
  5. End Sub
I've updated the code tags on your post.
This enabled me to see more clearly what was missed before :-
Expand|Select|Wrap|Line Numbers
  1.     Set rs = Me.Recordset.Clone  --------------------------Gives Error
  2. should be :
  3.     Set rs = Me.RecordsetClone  <--------Probably doesn't any more :)
The Clone object doesn't exist as an attribute of Recordset but the RecordsetClone object is an attribute of the Me object.
Your other code will still have problems but let's deal with them singly to avoid complications...
Jan 3 '07 #8
NeoPa
32,556 Recognized Expert Moderator MVP
BTW Another problem with the question was that you implied this was a port from one version to another.
Naturally we looked there for the problem.
However, this code never ran correctly anywhere. This is a very different problem from that which we we searching for.

Please don't see this as criticism (I also know you tried to get the code tags to work on your own) but as an illustration, for yourself and others, of how important the phrasing of a question really is.
Jan 3 '07 #9
powelly
18 New Member
BTW Another problem with the question was that you implied this was a port from one version to another.
Naturally we looked there for the problem.
However, this code never ran correctly anywhere. This is a very different problem from that which we we searching for.

Please don't see this as criticism (I also know you tried to get the code tags to work on your own) but as an illustration, for yourself and others, of how important the phrasing of a question really is.
I don`t see this as criticisim only help

The
Expand|Select|Wrap|Line Numbers
  1. Set rs = Me.RecordsetClone
that Fixed the problem thank you.

But

Do you mean this code never worked
Expand|Select|Wrap|Line Numbers
  1.  Set rs = Me.Recordset.Clone 
the reason i ask is that this code is in my other database (2000 Access) and it has no problem??
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo9_AfterUpdate()
  2.  
  3.     Dim rs As Object
  4.  
  5.     Set rs = Me.Recordset.Clone
  6.     rs.FindFirst "[Supplier & Product ID] = " & str(Nz(Me![Combo9], 0))
  7.     If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  8. End Sub
  9.  
The only problem i have is recordset.addnew how is this done in 97 becouse i can get it to work fine in 2000 in another data base but it won`t accept this in 97
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. Recordset.AddNew
  3. End Sub
  4.  
Jan 9 '07 #10
NeoPa
32,556 Recognized Expert Moderator MVP
But

Do you mean this code never worked
Expand|Select|Wrap|Line Numbers
  1.  Set rs = Me.Recordset.Clone 
the reason i ask is that this code is in my other database (2000 Access) and it has no problem??
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo9_AfterUpdate()
  2.  
  3.     Dim rs As Object
  4.  
  5.     Set rs = Me.Recordset.Clone
  6.     rs.FindFirst "[Supplier & Product ID] = " & str(Nz(Me![Combo9], 0))
  7.     If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  8. End Sub
That's what I meant.
Maybe my testing was inadequate. You sound as if you know what you're talking about. It was probably a Method (Procedure) rather than a property (data) though.
Jan 9 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Omey Samaroo | last post by:
I converted an access97 Database to Access 2K and have discovered that none of the control buttons work. Is there a simple work around ? Thanks Omey
1
by: Paweł \eGEO.pl\ | last post by:
Witam, Mam pytanie dotycz±ce konwersji z access 2000 do 97. Na co mam zwrócić uwagę przy projektowaniu bazy w a2k tak , aby docelowo mogła pracować w a97 (np. split itp.) Czy A2000 zawiera...
1
by: j.mandala | last post by:
I created a simple link between two tables in a query. TableA has Social Security numbers stored as Long Integer Data. (I imported this table). The Join is between these two fields Table ...
0
by: Timppa | last post by:
Hi, I'm converting ACCESS 2000 database to SQL Server. I have .adp project. In the .mdb I have form where I'll insert rows into two different tables using docmd.GoToRecod ,,acNewRec. In .adp...
8
by: Lieve | last post by:
Hello, I set up a database a few months ago and placed it on our company network. In the beginning, there was no problem opening it, even when someone else was working in it at that time. The...
10
by: NEWSGROUPS | last post by:
I work for an organization that is migrating from Access 2000 to Access 2003. About 5 or 6 years ago we migrated from Access 97 to Access 2000 with no problem. Will I have trouble converting these...
4
akabir77
by: akabir77 | last post by:
Hi I am using the following code to convert a access report into HTML format and then sending it via email. DoCmd.SendObject _ acSendReport, _ ...
1
by: goodridb | last post by:
Hi I made a macro to send a report as an email attachment in Access 2000. It is scheduled to run daily but returns an error message: "You must install a printer before you design,print or preview"....
20
by: ncsthbell | last post by:
We currently have Access 2000 and are converting to 2007. I have a very complicated Access application and am so lost with where to start. When I bring the application up, there are different tabs...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
1
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.