2 Versions Conflict.

vbjohn

Registered User.
Local time
Today, 03:41
Joined
Mar 22, 2002
Messages
75
This might be an easy answer or maybe a difficult one, depends on how you look at it.

I am working on Visual Basic Application and I am calling an Access 2000 report within VB 6.0. Some computers need to have both versions of Access 97 & Access 2000. On the computers that have just Access 2000 the program works great. But, when the people who have Access 97 and Access 2000 on their computers generate an error when they run the report.

Is there a way that I can work around this problem? Or would I have to just learn to deal with it until the managers decide to get rid of the program that needs that Access97?


Thanks-
John-
 
If you work on a machine with Access 97 and 2K it is important to specify which version of access you want to open the db with. This can easily be done by specifying it in the shortcut.

You say you're calling an access 2000 report, but it sounds like your calling a report without specifying which version you wish it to run in. Consequently if the last version used was Access97 then it will error out. When you call the report can you specify which version it uses either by the location of msaccess.exe or msjet40.dll?

HTH
John
 
ok

Thanks. Is there a way that you could give me some example?

This is what I am doing....

Private appAccess As Access.Application

strWhere = "(dbo_UPR30300HSE.AUCTRLCD = '" & txtATCode.Text & "')"
Set appAccess = New Access.Application

appAccess.Visible = False
appAccess.OpenCurrentDatabase App.Path & "\MNHouse.mdb", True

With appAccess.DoCmd
.OpenReport "DetailDeduction", acViewPreview, , strWhere
.Maximize
End With

appAccess.Visible = True


John-
 
Last edited:
I work within access rather than pure vb but I'll try and give you some pointers

Private appAccess As Access.Application

strWhere = "(dbo_UPR30300HSE.AUCTRLCD = '" & txtATCode.Text & "')"
Set appAccess = New Access.Application' Here can you specify the version by the path to MSaccess.exe (V2000)
appAccess.Visible = False
appAccess.OpenCurrentDatabase App.Path & "\MNHouse.mdb", True

With appAccess.DoCmd
.OpenReport "DetailDeduction", acViewPreview, , strWhere
.Maximize
End With

appAccess.Visible = True
 

Users who are viewing this thread

Back
Top Bottom