Difference 97 and 2003 using Shell and built-in logon form

  • Thread starter mjt7email-ggroups
  • Start date
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
 
P

Pieter Wijnen

The simplest solutions are either to add the /runtime switch to make it a
bit tidier
or add a login form to your loader app to mimick '97 functionality

Pieter
 
M

mjt7email-ggroups

Hello Pieter

I tried the /runtime switch but it didn't make any difference.

The launch db used to open a custom logon form, but it's ages ago and
I haven't tested it in 2003. I decided to dump the custom form because
if a PC was shared between 1+ users, there was an error (it worked
perfectly for single-user PC's). There's only one shared PC and I
can't remember the details now, except that although the error wasn't
major and didn't stop functionality, I decided to leave it to Access.
Actually, I asked myself afterwards "why on earth did you bother with
the custom logon form when Access does it".

Now perhaps I should trawl through my backups and convert the old
style launch db to see how it differs - if at all - in 2003.

Many thanks,
Marguerite
 
M

mjt7email-ggroups

Hello again Pieter

Thank you for the reminder about the custom logon form. I've
reinstated it from an old backup and it solves the problem - but then
you already knew that<s>.

At least now all that work I did using screen calipers so I could
(almost) match the dimensions of the built-in logon form is not
wasted!

Regards
Marguerite
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top