473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Simple Code Doesn't Work in a Converted DB

Greetings,

I have converted an Access 97 database with quite a bit of code in it
to Access 2000. After fixing a few data types (old database contained
statements like "Dim DB as Database" and "Dim RS as RecordSet," and
A2K choked on them), everything runs, except for one thing: one of the
forms has code attached to BeforeInsert property. When I begin typing
in that form, execution breaks *at the Private Sub Form_BeforeInsert*
line* with the "Can't find object or library" message. It doesn't even
get into the code - it's like A2K doesn't know what "Private Sub
Form_BeforeInsert(Cancel as Integer)" means.

Any ideas as to what could be wrong? Thanks!
Nov 12 '05 #1
3 2514
You need a reference to the Microsoft DAO 3.6 Object Library

See Tools ->References

Best to move the position somewhere about line no 4 otherwise sometimes it
will not compile
Phil
"Yisroel Markov" <ey*******@iname.com> wrote in message
news:2f**************************@posting.google.c om...
Greetings,

I have converted an Access 97 database with quite a bit of code in it
to Access 2000. After fixing a few data types (old database contained
statements like "Dim DB as Database" and "Dim RS as RecordSet," and
A2K choked on them), everything runs, except for one thing: one of the
forms has code attached to BeforeInsert property. When I begin typing
in that form, execution breaks *at the Private Sub Form_BeforeInsert*
line* with the "Can't find object or library" message. It doesn't even
get into the code - it's like A2K doesn't know what "Private Sub
Form_BeforeInsert(Cancel as Integer)" means.

Any ideas as to what could be wrong? Thanks!

Nov 12 '05 #2
It's hard to diagnose blind. If you want to foward me the code, I'd
be happy to take a look at it...

ey*******@iname.com (Yisroel Markov) wrote in message news:<2f**************************@posting.google. com>...
Greetings,

I have converted an Access 97 database with quite a bit of code in it
to Access 2000. After fixing a few data types (old database contained
statements like "Dim DB as Database" and "Dim RS as RecordSet," and
A2K choked on them), everything runs, except for one thing: one of the
forms has code attached to BeforeInsert property. When I begin typing
in that form, execution breaks *at the Private Sub Form_BeforeInsert*
line* with the "Can't find object or library" message. It doesn't even
get into the code - it's like A2K doesn't know what "Private Sub
Form_BeforeInsert(Cancel as Integer)" means.

Any ideas as to what could be wrong? Thanks!

Nov 12 '05 #3
"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message news:<3f*********************@mercury.nildram.net> ...
You need a reference to the Microsoft DAO 3.6 Object Library

See Tools ->References

Best to move the position somewhere about line no 4 otherwise sometimes it
will not compile
Thank you very much - this worked!

(I had to un-check the reference to Microsoft DAO 2.5/2.5
Compatibility Library (Program Files\Common Files\Microsoft
Shared\DAO\Dao2535.tlb), otherwise it gave me the "Name conflicts with
existing module, project, or library" message. I hope this will not
screw up something else...)

Yisroel

P.S. Alan, thanks for responding. It seems to me that the "Can't find
object or library" error is not ever likely to be related to code
itself.
Phil
"Yisroel Markov" <ey*******@iname.com> wrote in message
news:2f**************************@posting.google.c om...
Greetings,

I have converted an Access 97 database with quite a bit of code in it
to Access 2000. After fixing a few data types (old database contained
statements like "Dim DB as Database" and "Dim RS as RecordSet," and
A2K choked on them), everything runs, except for one thing: one of the
forms has code attached to BeforeInsert property. When I begin typing
in that form, execution breaks *at the Private Sub Form_BeforeInsert*
line* with the "Can't find object or library" message. It doesn't even
get into the code - it's like A2K doesn't know what "Private Sub
Form_BeforeInsert(Cancel as Integer)" means.

Any ideas as to what could be wrong? Thanks!

Nov 12 '05 #4

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

Similar topics

242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
1
by: Richard Barnet | last post by:
Why doesn't this work?: var backlink = readCookie("style"); if (backlink == ('medium' || 'large' || 'huge')) { document.write(" ... ");
7
by: J. Hall | last post by:
Hi dudes, Got a simple webpage, with three numeric text input boxes, the idea being that the user is asked to insert percentages of their business around the world... UK, Europe, Other ...
39
by: gtippery | last post by:
Newbie-ish questions - I've been away from C for a _long_ time. It seems to me that there ought to be easier (or at least shorter) ways to do what this does. It does compile & run for me (with...
38
by: venkatesh | last post by:
int *p=20; printf("%d",*p); printf("%d",p); the above code prints the output as somegarbage value //for *p(may be address 20 //for p why can you explain
9
by: shaun | last post by:
Dear all, I realized an error in a previous post, I reproduce it here because I'm still not sure how to solve it: I want to make a templated function which points to one-past-the-end of a...
5
by: Blasting Cap | last post by:
I have a VB6 program that runs as an app, that I want to both convert it to vb.net, and run it as a service on the server. I have been able to create the service, and what I did was to open the...
24
by: Michael | last post by:
Hi, I am trying to pass a function an array of strings, but I am having trouble getting the indexing to index the strings rather than the individual characters of one of the strings. I have...
0
by: =?Utf-8?B?RWFjaHVz?= | last post by:
I've made several attempts to upgrade an application from asp.net 1.1 to 2.0. I open the web site by selecting the vbproj file, by selecting the solution file, or by selecting the web application....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
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
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...

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.