How to view MS Access reports from VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Does anyone know how I can view ACCESS reports from my VB.NET application?
I know that in VB 6.0 the following works..

Dim appAccess as Access.Applicatio
Set appAccess = new Access.Applicatio
appAccess.OpenCurrentDatabase strDbNam
appAccess.DoCmd.OpenReport "Report_Name", acViewNormal

But this doesn't seem to work for VB.NET...does anyone know what I'm missing?

Thanks
Parveen
 
Just figured this out!! For those of you who are curious, to make the code work you have to

1. Download Microsoft Office XP Primary Interop Assemblies.

2. Reference Microsoft Access 10.0 Object Library - this is listed under the COM tab
in the list of references

3. Add this line to the beginning of your code - "Imports Microsoft.Office.Interop"
 
Hi Parveen,

Thank you for sharing this with us.

Cor
1. Download Microsoft Office XP Primary Interop Assemblies.

2. Reference Microsoft Access 10.0 Object Library - this is listed under the COM tab
in the list of references.

3. Add this line to the beginning of your code - "Imports
Microsoft.Office.Interop"
 
Back
Top