Strange Situation With Two Computers

N

Neil

Here's a strange situation.

I have an Access 2000 MDB with a SQL Server 7 back end, and a form with
several Microsoft Rich Textbox controls on it. The form is opened with a
simple Docmd.Openform "formname" command (no parameters).

The form opens fine on my computer and a user's computer. However, another
user was getting error 2501 ("The OpenForm action was canceled") when they
clicked the button to open the form. (There is no code in the form's Open
event to cancel the open in any circumstances.) This happened on another
computer as well.

So, two computers were able to open the form, and two weren't.

Looking at the drivers, etc., I saw that they were all identical:

OS: Windows XP (Version 5.1) Build 2600 (Service Pack 2)
Access version: 9.0.0.6620
Jet version: 4.0.8618.0
SQL driver version: 2000.85.1117.0

The above was for all four computers. Yet the form opened on two computers,
and not on the other two.

I tried placing the form in it's own MDB. But the results were the same.
However, when I decompiled the original file, the problem was resolved.

OK, so there was some glitch in the compiled code. Fine. But why then would
it work on two computers, and not on the other two computers? What could
have been different with those two computers besides the above 4 items to
have made it work on those two computers?

This is a very strange situation.
 
N

Neil

I did confirm that the richtx32.ocx file was on the problem computers.
Didn't check the references, though. But wouldn't the fact that a decompile
cleared up the problem mean it wasn't a bad reference?

I just don't understand why, if there was a problem with the compilation,
such that decompile cleared it up, that it would work on two computers, but
not work on another two computers.

Thanks,

Neil
 
N

Neil

Hi, Alex. First, it's not an MDE, but an MDB. But I ran some more tests.
This is getting even more bizarre.

OK, for the sake of simplicity, let's call the computers PC1, PC2, PC3. PC1
is my development PC. PC2 is a user PC that has no problems with the form.
And PC3 is the PC that has the problems. As noted, all three PCs have the
exact same configuration in terms of Access, Jet, SQL, and Windows.

The original file was compiled on PC1 and worked fine on PC2, but wouldn't
open on PC3. Got error 2501 ("The OpenForm action was canceled"). I then
decompiled the file and it opened on PC3.

However, I found that when I decompiled AND THEN RECOMPILED (by selecting
Compile from the Debug menu) the file, either on PC1 or PC2, it wouldn't
open on PC3. Only if I decompiled the file and then did nothing (basically
allowing PC3 to compile it when it was run) did it work on PC3. Otherwise,
the decompiled/recompiled file didn't work on PC3.

In terms of libraries, the file has five references listed:
- Visual Basic for Applications
- Microsoft Access 9.0 Object Library
- OLE Automation
- Microsoft DAO 3.6 Object Library
- Microsoft Rich Textbox Control 6.0 (SP6).

I removed the OLE and DAO references (since they weren't used in my test
file), which left just the other three. The first two, of course, couldn't
be removed, and the last one (rich textbox control) was needed for the form.
The problem remained.

I checked on PC3 to see if there were any broken references. There weren't
any. And I also checked the version of the rich textbox control ocx
(richtx32.ocx). It was the same as on the other two PCs.

So, unless there's some issue with the VBA or Access Object Library
references, I don't know what it could be. I'll note the PC3 runs the main
Access application that all other computers are running, and doesn't have
any problems. It's only with this form that has the rich textbox control,
that it won't open the form unless the file is in an uncompiled state and
PC3 compiles it.

Any ideas as to what's going on here??

One last note, while PC3 will open the file with the form having the rich
textbox control if it compiles the file itself, once the form is opened, the
control is in a read-only state. The form will add records, and regular text
boxes work fine. But the rich textboxes on the form are read only. I just
don't see what could be the issue with this PC where it's having these
problems.

Thanks!!

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top