Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Database not opening when using VBA

Posted on 2012-03-14
2
Medium Priority
?
370 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

705 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