Solved

Database not opening when using VBA

Posted on 2012-03-14
2
367 Views
Last Modified: 2012-03-14
I have an ACCESS 2003 database that I am using to open other databases.  This "menu" database only has one form and on that button that open other databases.  However, I am trying to set up the first database and while the "child" database has an lb file saying I am in it, I cannot see the database.  

Private Sub lblCAR_Click()
Dim appAccess As Access.Application
Dim strDB As String

Const strConPathToSamples = "\\Sf1\User1\" & _
        "shared\DepositServices\CIA\SOS_APPLICATIONS\LM_Reporting\"

    strDB = strConPathToSamples & "LMR_FE_UserTesting.mdb"
    ' Create new instance of Microsoft Access.
    Set appAccess = CreateObject("Access.Application")
    ' Open database in Microsoft Access window.
    appAccess.OpenCurrentDatabase strDB


End Sub
0
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 37721083
appAccess.OpenCurrentDatabase strDB

appAccess.Usercontrol=true   '<<< ADD this line
0
 

Author Closing Comment

by:ssmith94015
ID: 37721149
That did it, thank you.

Sandra
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

710 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