Odd error message

B

Barry

Hello,
I have a split database that works fine on my pc.
However, when I installed it on another pc, I get my
custom error message as the db opens. There does not
seem to be any problem in the db's performance, and I am
certain the problem is not what my custom error message
says. I have the proper preferences selected for DAO,
etc.

The error message I wrote reads: "The table links are
not correct. Enter the path for Refresh Links, and click
Refresh." I created that message on the assumption that
a problem could result if the db opens and the back end
has been moved or is installed somewhere othier than at
the default path.

I got this message once before when I installed a copy of
the db which I had created while neglecting to check the
proper DAO option in the Preferences list. (I did check
it on this one.) I have a little bit of DBA code that
keeps open the links to help the speed, and it runs at
the opening.

The user was not seeing this problem until a few weeks
ago. Since then, the above error message appears every
time the db opens. However, nothing appears to be wrong
with the db's performance. All the data appears, the
reports work, etc., so the problem can't be related to
the table links. Apparently something is happening on
opening which I didn't anticipate. Can anyone think of
what might be causing this message to appear, and what I
can do about it? Thank you very much for your help.







Can someone suggest what is causing this error on
opening, and what I can do about it? Thanks in advance
to anyone who replies.

Ummm... care to give us a hand here?

You say "my custom error" without specifying what that
error might be
or what is designed to trigger it.
 
J

John Vinson

The error message I wrote reads: "The table links are
not correct. Enter the path for Refresh Links, and click
Refresh." I created that message on the assumption that
a problem could result if the db opens and the back end
has been moved or is installed somewhere othier than at
the default path.

Please post your code. It's impossible to guess what you might be doing
wrong unless we can see what you're doing!

John W. Vinson/MVP
 
B

Barry

Hi John,

Thank you for your help with my problem. This is the
code I use:

Option Compare Database

Public rsAlwaysOpen As Recordset


The db was working fine until about a month ago, and I
didn't make any changes to the code. Thanks again, and I
look forward to your reply.
 
J

Jerry Porter

If the code is not doing what you expect, you should step through the
code to find why. Have you tried putting a break point at an early
point in the code, and then stepping through the code (F8) to see
exactly what's happening?

Jerry Porter
 
J

John Vinson

Barry said:
Hi John,

Thank you for your help with my problem. This is the
code I use:

Option Compare Database

Public rsAlwaysOpen As Recordset

Barry, this isn't the right code; this is just the two lines at the top of
the screen, one specifying the sorting options, the other creating a
recordset object.

I cannot see your database so there's no way for me to guess where the right
code might be - but find the error message that you're getting, using the
binoculars in the VBA editor; and please copy and paste the Sub containing
that message to the newsgroup.

The message is not coming out of thin air. It's in your code somewhere!

John W. Vinson/MVP
 
B

Barry

John, thank you for your reply.

The code I pasted on my prior message is all there is in
the module. I used it so it would improve the db's speed
for a user that had the back end on a network. I just
lifted those lines from an article I had read somewhere.
(I'm not very conversant in VBA. With the exception of
the above lines, I just created a lot of macros and
converted them to VBA to trap errors.)

In any case, I don't think the problem is the code. I
can't replicate the error message I describe on my PC or
on several other users'; it only happens on one user's.

When I created the message that she is seeing, I thought
the only error that would appear when the db opens would
be in the event that the table links were not correct.
But since she has access to all of the data, the error
message is clearly not displaying because of a problem
with the table links. In that case, my error message's
text is not accurately describing the problem. So my
question is: Is there a different error that could occur
when a db opens? And what could I do about it?

Thanks very much for your help.
 
J

John Vinson

When I created the message that she is seeing, I thought
the only error that would appear when the db opens would
be in the event that the table links were not correct.

Sorry, Barry. We're just not communicating.

You say "you created the error message that she is seeing". The code
you posted gives no evidence of that.

I have NO idea where this error message is coming from, other than
that it is not one of the error messages that Access will generate.
It's from your code, somewhere. I don't know where and I have no way
to find out.

I'd suggest that you take the suggestion of stepping through the code.

John W. Vinson[MVP]
 
Top