Access 2010 does not open form

Posted on 2011-10-20
Last Modified: 2012-05-12
I have an Access report that opens OK in 2007 but I get a blank screen in Access 2010. Can anyone help? (I don't have 2010 on my PC so it's hard to test)

Here's the Load/Open VBA: -

Private Sub Form_Load()
' Set form size
    Me.InsideWidth = 1440 / 2.545 * 11
    Me.InsideHeight = 1440 / 2.545 * 8
End Sub

Private Sub Form_Open(Cancel As Integer)
' Set defaults
    Me.txtStart = Date - 1
    Me.txtFinish = Date - 1
    Me.txtSalesOrderFile = "SalesOrd_" & Format(Me.txtStart, "yymmdd") & "_to_" & Format(Me.txtFinish, "yymmdd") & "_.xls"
    Me.txtInvoiceFile = "SalesInv_" & Format(Me.txtStart, "yymmdd") & "_to_" & Format(Me.txtFinish, "yymmdd") & "_.xls"
    Me.txtFileLocation = "X:\RLC\"
End Sub
Question by:HKFuey
    LVL 84
    Is this the ONLY form that is having troubles?

    References could be an issue on the 2010 machine - can you list out the references you've got set on your database (VBA Editor - Tools - References)?
    LVL 61

    Expert Comment

    <I have an Access report that opens OK in 2007 >

    Also, just as a sanity check...

    Did you post the correct code?  You are describing an issue with a report, but the code you posted is for form events.

    Author Comment

    Sorry it's a form that runs 2 reports based on dates entered.

    I'm going to set up Access 2010 on my PC to try figure it out.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    Also, clearly define what you mean by a "Blank Screen".
    The entire computer screen?
    The Access window?
    just the report/form is blank?
    The report/form has headers and footers, but no data?
    (Post a screenshot)

    Author Comment

    OK, the Access screen was blank when opening in Access 2010 (even though a form was specified in startup).
    I installed the Access 2010 runtime and replicated the error. I tried a previous version of the Access App  and it worked OK so I must have corrupted it somehow (even though it works OK in 2007)

    I used an older version of the app, imported the (changed) queries and reports and it works!
    (I don't know why it works now but do I need to???) Blank Form
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    The only time I have seen something like that is when the user does not have access to modify the data.

    Perhaps another Expert can assist further...
    LVL 74

    Accepted Solution

    If you still have a copy of access 2007, try this:
    (Make sure you have all updates and service packs installed for Windows, Office 2007 and Office 2010)
    1. Open the BD in Access 2007 and
    a. Run the compact/repair utility
    b. compile the code (in the vba editor, click Debug-->Compile)
    c. Run the compact/repair utility again
    2. Open Access 2010 and create a blank new database
    3. Import all of the objects

    Author Closing Comment

    Thanks for the help
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now