access 2000 et visual basic

I converted my access 97 database to access 2000, when I try to open a report with access 2000, it work fine, but with Visual Basic, the access windows open, but the report doesn't.

(I have VB 6.0 with Service Pack 5, I have the reference to the Access 9.0 object library in my application. All my application work fine, exepct for open a report.)

My code :

Dim acApp As Object
Set acApp = CreateObject("Access.Application.9" )
Dim path As String
path = CurDir & "\db.mdb"
With acApp
.OpenCurrentDatabase path
.DoCmd.OpenReport "report1", acViewPreview
End With
Set acApp = Nothing

please help!!!!!!!
jfmcduffAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fluglashCommented:
what error do you get?
0
jfmcduffAuthor Commented:
I have no error, the access windows open, but the report doesn't open.
0
jfmcduffAuthor Commented:
I have no error, the access windows open, but the report doesn't open.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

fluglashCommented:
are you sure the report is there?
0
jfmcduffAuthor Commented:
yes, my application work fine with access 97, bu after i converted it to access 2000, all my report doesn't open with visual basic.
0
Éric MoreauSenior .Net ConsultantCommented:
Change acViewPreview for its numerical value (1 I think).
0
jfmcduffAuthor Commented:
tanks, but Change acViewPreview for its numerical value, don't work
0
Éric MoreauSenior .Net ConsultantCommented:
change
Set acApp = CreateObject("Access.Application.9" )

to
Set acApp = CreateObject("Access.Application" )
0
jfmcduffAuthor Commented:
tanks but it don't work :(
I have selected the Access 9.0 object library and DAO 3.6, Do i Need other librairy?
0
Éric MoreauSenior .Net ConsultantCommented:
remove Set acApp = Nothing
0
jfmcduffAuthor Commented:
tanks but it don't work :(
0
Éric MoreauSenior .Net ConsultantCommented:
change CurDir
for app.path

if still not working, you can send a small test (zip containing vb + mdb) to emoreau99@hotmail.com
0
Éric MoreauSenior .Net ConsultantCommented:
Ouch!

After creating the instance, set it visible!
    acApp.Visible = True
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jfmcduffAuthor Commented:
cooolllll :P tanks you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.