I've got a program that I wrote in VB 6.0 which accesses an
Access database and prints reports. The following code is
used to preview the report:

Code:
       Dim acc As Access.Application
       Dim strWhere As String
    
       Set acc = New Access.Application
       acc.DoCmd.SetWarnings False
       acc.OpenCurrentDatabase (App.Path & "\hours.mdb")
    
       strWhere = "tblHours![ClockIn] >= "
       strWhere = strWhere & "#" & FormatDateTime(DtFrom.Value, vbShortDate) & "#"
       strWhere = strWhere & " AND "
       strWhere = strWhere & "tblHours![ClockIn] <= "
       strWhere = strWhere & "#" & DtTo.Value & "#"
       strWhere = strWhere & " AND "
       strWhere = strWhere & "tblHours![ClockOut] <> "
       strWhere = strWhere & "#12:00:00 AM#"
    
       acc.DoCmd.OpenReport "Hours_Left", acViewPreview, , strWhere
       acc.DoCmd.Maximize
       acc.Visible = True
       acc.DoCmd.SetWarnings True
       Set acc = Nothing
       Frame1.Visible = False
       frmHours.Height = 4515
       DtFrom.Value = Now()
       DtTo.Value = Now()
This code works fine on all the machines I have except the one
with Visual Studio.NET installed. On this machine I get the
following error:

Run-time error '- 2147023654(80070534)':

Automation Error
No mapping between account names and security ID's
was done.

There is no security enabled on this database. What's happening? Is there something in Visual Studio.Net that
is interfering.