Microsoft
Software
Hardware
Network
Question : How can an Access database be opened in a new window using Access VBA?
I have this:
How can an Access database be opened in a new window using Access VBA?
Public Sub OpenDatabase(DatabaseName)
Dim strDB As String
Dim appAccess As Access.Application
Dim strFilename As String
Dim PathIs As String
'**Detect path
'PathIs = Application.CurrentProject
.Path
DriveLetter = Left(Application.CurrentPr
oject.Path
, 1)
PathIs = DriveLetter & ":\" & DatabaseName
strDB = PathIs & "\" & DatabaseName & ".accdb"
'**Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Appli
cation")
'**Open database in Microsoft Access window.
appAccess.OpenCurrentDatab
ase strDB
'**Open AutoExec form.
appAccess.DoCmd.OpenForm "AutoExec"
End Sub
Public Sub OpenDatabase(DatabaseName)
Dim strDB As String
Dim appAccess As Access.Application
Dim strFilename As String
Dim PathIs As String
'**Detect path
'PathIs = Application.CurrentProject
.Path
DriveLetter = Left(Application.CurrentPr
oject.Path
, 1)
PathIs = DriveLetter & ":\" & DatabaseName
strDB = PathIs & "\" & DatabaseName & ".accdb"
'**Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Appli
cation")
'**Open database in Microsoft Access window.
appAccess.OpenCurrentDatab
ase strDB
'**Open AutoExec form.
appAccess.DoCmd.OpenForm "AutoExec"
End Sub
Answer : How can an Access database be opened in a new window using Access VBA?
Did you made any changes on the GAL?
if yes you might need to wait for replication.
Random Solutions
Registry - Winlogn last user logged in - Win7
Why is Kaspersky internet security 2010 blocking
www.apple.com
The name on the security certificate is invalid or does not match the name of the site
Exchange 2003 Consolidated Report - Forward mail/Distribution Groups etc.
weird effects using ROUND() on REALs in TSQL
from X and Y cordites
how to implement the screen which can be in form of grid lines in swings
DT_WSTR dropping value before decimal point in SSIS
Why the record on my database is incomplete??????
unable to open internal url using VPN