By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,600 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,600 IT Pros & Developers. It's quick & easy.

Open Access Database Form from within Access database

P: n/a

I have included the following code to open an Access database form from
within an exsisting Access database. But when I run the code, it
appears that it opens the database because in windows explorer I can see
the database has the .ldb file extension. So it appears that it's open,
but I can't see the database or the form that I've tried to open. What
am I doing wrong. The following is the code:

'This is in the declaration part of the module

Dim appAccess As Access.Application

' Initialize string to database path.

Const strConPathToSamples = "C:\Documents and Settings\My
Documents\Careset Data Verification\Error Log Database.mdb"

strDB = strConPathToSamples & "Error Log Database.mdb"

' Create new instance of Microsoft Access.

Set appAccess = CreateObject("Access.Application")

' Open database in Microsoft Access window.

appAccess.OpenCurrentDatabase strConPathToSamples

' Open form.

appAccess.DoCmd.OpenForm "Import Error Logs", acNormal

Thanks in advanced,

bailee220
--
Posted via http://dbforums.com
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
After these lines of code:

' Create new instance of Microsoft Access.

Set appAccess = CreateObject("Access.Application")

' Open database in Microsoft Access window.

appAccess.OpenCurrentDatabase strConPathToSamples

'-->you need to place this line of code

appAccess.Visible = True '<--missing this line here

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.