Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database not opening when using VBA

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

879 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