msacc.olb / Access 2000 v9 (in)compatability

  • Thread starter Thread starter Flynn
  • Start date Start date
F

Flynn

I'm maintaining a system with a VB6 (SP6) front end and an
Access 2000 v9 database running under XP, using ado for
standard database calls. This has worked fine for a few
years now.

I've developed two new reports in the Access 2000 database
(running in development under Access 2002 v10) and am
using the following syntax to call the reports from the VB
front end:

Db.Close ' closes the ado connection

appAccess.OpenCurrentDatabase "C:\mydatabase.mdb", False
appAccess.DoCmd.OpenReport "MyReport", acViewNormal
appAccess.CloseCurrentDatabase
appAccess.DoCmd.Quit acQuitSaveNone

To achieve this, I included msacc.olb as a project
reference in VB.

This works fine in my development environment, but in the
end-user environment (Access 2000 v9), rpcrt4.dll always
falls over at the "appAccess.OpenCurrentDatabase" command.

I'm guessing this is because the Access 2000 end-user
database recognises msacc9.olb rather than msacc.olb. So
a few questions:

1). Does my diagnosis sound correct?

2). I've copied msacc9.olb to my development machine but
VB won't recognise it as a project reference. Is there a
way I can get msacc9.olb registered on my development
machine without a doing a complete installation of Access
2000?

3). If I do a complete installation of Access 2000 v9 on
my development machine, will this a) let me register
msacc9.olb as a project reference and b) cause any
problems with Access 2002 v10?

Getting the end-users to upgrade to Access 2002 isn't
currently an option. Any help gratefully received!
 
AFAIK, it's not legal for you to redistribute msacc.olb or msacc9.olb.

How are you instantiating appAccess?

Take a look at http://support.microsoft.com/?id=210132 and see whether that
works any better for you. If you uncomment the constant declarations in step
3, you shouldn't even need to set a reference to any version of Access.
 
Hello Doug,

Thanks for your swift answer!

So far, msacc.olb hasn't got any further than my first
user test environment. I've always used the VB packaging
wizard to distribute the VB runtime and the wizard
included msacc.olb automatically.

Here's the answer to your question.

Dim appAccess As New Access.Application

I'll check out the support article.

Again, many thanks.

Flynn
 
Hello Doug,

I've removed msacc.olb from the VB project references and
included the code from the support page.

This works fine on my development pc.

On the runtime pc (which has a bought copy of Access), the
rpcrt4.dll no longer falls over, but now there's an error
message "OpenReport command is not currently available".

Er, any clues????

Many thanks,

Flynn
 
Hello Doug,

I've removed msacc.olb from the VB project references and
included the code from the support page.

This works fine on my development pc.

On the runtime pc (which has a bought copy of Access), the
rpcrt4.dll no longer falls over, but now there's an error
message "OpenReport command is not currently available".

Er, any clues????

Many thanks,

Flynn
 
Sorry, no. I've never heard of any problems with the code in the KB article
before.
 
Back
Top