M
mjt7email-ggroups
Hello Everyone
I have both 97 and 2003 installed for converting and testing a secured
split database.
The FE is launched via a shortcut to a secured intermediary db (call
it Launch) which compares the version number between the server and
local FE. The shortcut to the Launch db is: "Access.exe
path""secure.mdw path" "launchPath" /user "has PermissionToOpenFE and
get VersionNumber" /pwd xyz /cmd "REAL userName"
The only form in the Launch db hides the Access window in the open
event and this part of the code works as expected in both 97 and 2003,
code from:
http://www.mvps.org/access/api/api0019.htm
The Load event does the version# comparison, acts accordingly and
launches the local FE - which is intercepted by the built-in Access
logon form with the real user name already filled in (from the /cmd
switch).
In 97, the built-in Access logon form appears in front of the
"Microsoft Access 97" splash screen, with nothing else showing and it
looks tidy.
In 2003, the logon form appears in front of a normal Access window,
with the Title, Menu, Tool and Status bars showing.
Functionality is the same, but I'd like to have a tidy window in 2003
too.
Can you tell me a way I can make this behave or look in 2003 as it
does in 97 please?
****
Code in the Launch form
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Handler
Me.Visible = True
fSetAccessWindow (SW_HIDE)
Exit_Here:
Exit Sub
Err_Handler:
MsgBox Err.Number & " : " & Err.Description
Resume Exit_Here
End Sub
Private Sub Form_Load()
On Error GoTo Err_Handler
'Dim .... and do the comparison here
'extract the user name from the shortcut /cmd switch (or let Access
default to the last user)
'and launch the local FE using Access' built-in logon form
strQuote = Chr$(34)
strCmd = Nz(Command, "")
strCmd = Trim(strCmd)
strAccDir = SysCmd(acSysCmdAccessDir)
strAccPath = strAccDir & "MSACCESS.EXE"
strPathShell = strQuote & strAccPath & strQuote _
& " " & strQuote & strLocalFE & strQuote _
& " /wrkgrp " & strQuote & strMDW & strQuote
If Len(strCmd) > 0 Then strPathShell = strPathShell & " /user " &
strQuote & strCmd & strQuote
On Error Resume Next
Shell strPathShell, vbMaximizedFocus
Exit_Here:
On Error Resume Next
rst.Close
Set rst = Nothing
Application.Quit
Exit Sub
Err_Handler:
'error handling stuff
Resume Exit_Here
End Sub
****
Thank you for any help.
Marguerite
I have both 97 and 2003 installed for converting and testing a secured
split database.
The FE is launched via a shortcut to a secured intermediary db (call
it Launch) which compares the version number between the server and
local FE. The shortcut to the Launch db is: "Access.exe
path""secure.mdw path" "launchPath" /user "has PermissionToOpenFE and
get VersionNumber" /pwd xyz /cmd "REAL userName"
The only form in the Launch db hides the Access window in the open
event and this part of the code works as expected in both 97 and 2003,
code from:
http://www.mvps.org/access/api/api0019.htm
The Load event does the version# comparison, acts accordingly and
launches the local FE - which is intercepted by the built-in Access
logon form with the real user name already filled in (from the /cmd
switch).
In 97, the built-in Access logon form appears in front of the
"Microsoft Access 97" splash screen, with nothing else showing and it
looks tidy.
In 2003, the logon form appears in front of a normal Access window,
with the Title, Menu, Tool and Status bars showing.
Functionality is the same, but I'd like to have a tidy window in 2003
too.
Can you tell me a way I can make this behave or look in 2003 as it
does in 97 please?
****
Code in the Launch form
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Handler
Me.Visible = True
fSetAccessWindow (SW_HIDE)
Exit_Here:
Exit Sub
Err_Handler:
MsgBox Err.Number & " : " & Err.Description
Resume Exit_Here
End Sub
Private Sub Form_Load()
On Error GoTo Err_Handler
'Dim .... and do the comparison here
'extract the user name from the shortcut /cmd switch (or let Access
default to the last user)
'and launch the local FE using Access' built-in logon form
strQuote = Chr$(34)
strCmd = Nz(Command, "")
strCmd = Trim(strCmd)
strAccDir = SysCmd(acSysCmdAccessDir)
strAccPath = strAccDir & "MSACCESS.EXE"
strPathShell = strQuote & strAccPath & strQuote _
& " " & strQuote & strLocalFE & strQuote _
& " /wrkgrp " & strQuote & strMDW & strQuote
If Len(strCmd) > 0 Then strPathShell = strPathShell & " /user " &
strQuote & strCmd & strQuote
On Error Resume Next
Shell strPathShell, vbMaximizedFocus
Exit_Here:
On Error Resume Next
rst.Close
Set rst = Nothing
Application.Quit
Exit Sub
Err_Handler:
'error handling stuff
Resume Exit_Here
End Sub
****
Thank you for any help.
Marguerite