Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting rid of Access' shell 4

Status
Not open for further replies.

rcoutts

Technical User
Sep 5, 2001
60
0
0
US
I have a simple time card form. I would like to run it without bringing of the whole Access environment, including the Menus, tool bars, and Access's window itself. So, when the user open's their time card, all they see is the form and nothing else -- is this possible? I see that I can disable their ability to modify the form, but I'd love to take it one step further.

Thanks!
Rich
 
Sorry, but from what I have heard, no... Terry M. Hoey
 
Well, Rich...
You can maximize the form on loading Access (2000). Then, if someone wants to they can close the form, closing the database, but leaving the environment open. Then if they select the same database again, they will be looking at the database window...I'm going to try to close Access when the form is closed...but how do I get back in myself? (probably lock myself out, so I'll make a back up first...
Good luck,
:) Gus Brunston
An old PICKer
padregus@home.com
 
I would recommend using Visual Basic and make a database that way. Your program will have it's own runtime and does not require access (but you won't get the help that access gives you either). The front end is easy to make, it's the back end that takes some know-how.
 
I would unders Tools-Startup select your intial form to open and uncheck "display database window". If you put "DoCmd.Quit" into the "on close event" of the startup form the user will never see the interface. If you uncheck the "Allow..." boxes you will not see the extraneous command and tool bars.
 
Changing the startup options worked great!!....umm, any way to turn them off again so I can continue editing now that the 'tools' menu doesn't come up anymore? :)
 
hold down the left shift key as you start the database to bypass start up options. Remembers users can do this aswell!!!!! Jamie Gillespie
j-gillespie@s-cheshire.ac.uk
 
Unless you use the Bypass Shift Key code. Note, make a backup of your DB out you'll never be able to undo it....

The code below will allow you to turn off the shift key work around... If you run the code with "false" instead of "True". If you want to re-enable the shift key work around just re-run the code with "false"

Code:
Function PreventBypass() As Boolean
'Dim prp As Property

'Set prp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, True, True)
'CurrentDb.Properties.Append prp

'Set prp = Nothing
CurrentDb.Properties("AllowBypassKey") = false
End Function

' The only thing you have to modify is 
'CurrentDb.Properties("AllowBypassKey") = false or true
Tyrone Lumley
augerinn@gte.net
 
What I did for this issue is this:
1-create a blank form called "background", set its property to "popup"
2-run it at startup with docmd.maximize (macro:autoexec)
3-assign a menu for it domenu....
It may help ! :)
 
Hi Rich,
I think this might be what you're after. I cannot claim credit for this as I got the source from somewhere off the net a while ago. Follow these steps and see if it does the trick. Oh and by the way, I suggest doing this on a backup copy of your database

Step 1:
Create a module in your database called 'Hide or Show Access Window'

In this module insert the following code:

Option Compare Database
Option Explicit
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long

Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long

Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If
If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If
If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If
End Function

Step 2:
Create an Autoexec macro that has the following actions:

Runcode fAccessWindow ("Hide",False, False)
OpenForm "open your initial form or switchboard"

Step 3:
Finally change the Popup property on all the forms you wish to display to YES.

To try it out, close your database and open it again. This should give you just the form that you selected in your Autoexec macro. You will not see any of the Access environment. This is unless the user presses the shift key when launching the database, as mentioned earlier in this post.

Hope this helps

Keith
 
Thanks for the Access shell code, It works fine but is it possible to do the same changes to Reports? I´ve been trying but can´t seem to get it right. The Reports stay hidden even though I change the same properties as for the Forms.
 
frontside,

you cannot make the reports popup, so they won't work under this method...I have a sample database setup to work around this...send me an email at the address below and I will forward to you...

basically, what you have to do is in the onopen of each report, restore the Access window, and then on the onunload of the report, hide the window again. If we knew what it was we were doing, it would not be called research, would it? - Albert Einstein [atom]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top