Solved

Database not opening when using VBA

Posted on 2012-03-14
2
358 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

896 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

12 Experts available now in Live!

Get 1:1 Help Now