469,270 Members | 1,764 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Open Access Database Form from within Access database


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
1 10498
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.

Similar topics

14 posts views Thread by SimeonD | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.