Hi I am using VB6, Access97, and am trying to view reports using a ADO DataEnvironment.

I've tried the following code...

Public Sub OpenReport(rptName As String)

Dim objAccess As New Access.Application

objAccess.OpenCurrentDatabase (DataEnvironment1.Connection1)
Screen.MousePointer = vbHourglass
objAccess.DoCmd.OpenReport rptName, View:=acPreview
objAccess.DoCmd.Maximize
Screen.MousePointer = vbDefault
objAccess.Visible = True

...but get the error "Microsoft Access cant open the database because it is missing, or opened exclussively by another user."

I made sure the connection was not already opened... but still get the same error...any ideas?

Cheers Jonny