Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6352093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:08:10+00:00 2026-05-24T22:08:10+00:00

I am trying to open an access report through .net. I can open it

  • 0

I am trying to open an access report through .net. I can open it in normal mode using Access.AcView.acViewNormal, but it’s not what I want to do because that prompts the user to save the first and then it can be viewed. I want the report to pop up and it seems .acViewPreview or .acViewReport is what i should use, but it’s not popping up.

It does open up a process and seems to be opening, but i can’t see the report. Perhaps it’s closing really fast. The following is the code I have currently

private void buttonResults_Click(object sender, EventArgs e)
    {
        Microsoft.Office.Interop.Access.Application oAccess = new Microsoft.Office.Interop.Access.Application();
        oAccess.OpenCurrentDatabase("D:\\path.mdb",true);

        try
        {
            oAccess.DoCmd.OpenReport("rptChartData", Microsoft.Office.Interop.Access.AcView.acViewPreview);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }

What am i doing wrong?? Thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:08:10+00:00Added an answer on May 24, 2026 at 10:08 pm

    I don’t know Dot Net. I put this code in an Excel module and it created an Access instance and displayed my report. The key seemed to be oAccess.Visible = True Without setting Visible = True, Access opened (and remained open) with the report but was just not visible.

    Dim strDbFullPath As String
    Dim oAccess As Access.Application
    
    strDbFullPath = "C:\Access\webforums\whiteboard2003.mdb"
    Set oAccess = New Access.Application
    
    oAccess.Visible = True
    oAccess.OpenCurrentDatabase strDbFullPath, True
    oAccess.DoCmd.OpenReport "rptFoo", acViewPreview
    

    So I think this may not be a Dot Net issue, but standard behavior for an Access application instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying open a new window using url.Action. And the new Window url
im trying to open a file using StreamReader and ive to set a Encoding,
I'm trying to open a Microsoft Excel file in a C# program using the
I'm trying to open and read from a serial port using the System.IO.Ports.SerialPort class.
I am trying to open a process handle in C# using the OpenProcess function
I am trying to open one window from another using makeKeyAndOrderFront. The new window
I'm trying to open a series of Excel spreadsheets using an instance of Excel
I am getting the following error trying to open a DevExpress report in VS
I'm trying to open a RecodSet with a SELECT statement but I keep getting
I've got a MS Access database here that I can open in Access 2007

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.