# Solved: how to open form without open access window



## Jayabhadra (Feb 13, 2012)

I am working on database for user who completely blind to microsoft access. So I make a form for them to work with.

Since the access window is kind of distracting, does anybody know how to open form without the access window open?

Thanks in advance!


----------



## Elvandil (Aug 1, 2003)

What program would you use to open the file if not Access? If you can find one that has a minimal window, you can use that.


----------



## Jayabhadra (Feb 13, 2012)

Thanks for your reply. A friend of mine said he once made a database with only the form visible. It's a long time ago so maybe using access 2003, but he forgot how to do it..

Can anyone help? Thanks


----------



## OBP (Mar 8, 2005)

You can completely hide the Access database window, look at the Startup options.


----------



## Jayabhadra (Feb 13, 2012)

Is it in access options? I am using access 2007 btw. Which tab should i choose? have tried it this afternoon but can not find it.

Thanks OBP


----------



## OBP (Mar 8, 2005)

Yes well that is the nice working interface that Office & Access 2007 uses.
Try
MS Office Button>Access Options>Current Database.


----------



## Jayabhadra (Feb 13, 2012)

Wow, thanks for your reply. I have tried uncheck the "display navigation pane" and "allow full menu". It's working hiding all the button but the window still open. Is this what you mean? And it is customize in access option so if the user open it in different computer it will be visible again, right?


----------



## OBP (Mar 8, 2005)

I don't know as I have Access 2003.


----------



## Jayabhadra (Feb 13, 2012)

can you print screen the resulting database after hiding the access window (2003)? i'll just make sure that's the one my friend was talking abt. thanks!


----------



## OBP (Mar 8, 2005)

Would this be what you want?


----------



## Jayabhadra (Feb 13, 2012)

My friend said the access window is completely hidden, but I guess yours is ok, at least the user won't screwed up my tables and queries. If you know any other way pls let me know.

Thanks!


----------



## rulerpeaceful (Feb 17, 2012)

How skilled are you with the VBA language? We recently had an interesting thread on this. In this thread we were able to hide the MS Access application and show the form only. Your form must be set to popup and Modal. Let me know if this helps at all. There are ways to resize the application window and hide the menus etc. just depends on what approach you would like to take.


----------



## Jayabhadra (Feb 13, 2012)

I'm quite new with VBA language. Don't understand every detail syntax but have done some commands in my form using google. So just copying the code used by others. But I do know how to make my form pop up. Can you explain "modal"? Pls help if you know how, since completely hiding access window will make my database have a really good package ^^. Thx


----------



## OBP (Mar 8, 2005)

As rulerpeaceful says you can use VBA to hide the window when all Forms are set to Popup, apparently you shouldn't need Modal as well. 
You need an Autexec macro to run the following code in a Module

fAccessWindow ("Minimize", False, False)

So you need to create a Module and then create a macro called Autoexec to "call" the new Module.


----------



## Jayabhadra (Feb 13, 2012)

Really sorry but I don't know what a module is, I am quite new to coding.. Can you explain more?


----------



## OBP (Mar 8, 2005)

You open the VBA editor (Alt + f11) and on the Menu Insert>Module which is basically the same as an event procedure but it cna be "called" from anywhere in the database.


----------



## Jayabhadra (Feb 13, 2012)

I'm trying to make the module in the last file you posted. Is this correct:
Option Compare Database
Public Sub AutoExec()
fAccessWindow ("Minimize", False, False)
End Sub

By the way, how to turn the file back to normal? Because it even dont have any "save as" option..

Thanks


----------



## OBP (Mar 8, 2005)

You use 
fAccessWindow ("Show", False, False)
to set it back to normal.


----------



## Jayabhadra (Feb 13, 2012)

Is this the right content of the module:
Option Compare Database
Public Sub AutoExec()
fAccessWindow ("Minimize", False, False)
End Sub

Cause it says syntax error..

I mean to turn the file you posted back to normal, how did you do it?


----------



## OBP (Mar 8, 2005)

Sorry there is more to it than that. I will test it and get back to you.


----------



## OBP (Mar 8, 2005)

Ok, I had the order mixed up, you need 2 macros, one to turn off the window and one to turn it back on.
They use 2 extensive VBA Functions in one module called Module1.
So I have created a form called Form1 in pop up mode. In the OnOpen event I have used the Macro Hide and in the OnClose event I have used the Show macro.
Opne the form and Access disappears, close it and Access re-appears.


----------



## Jayabhadra (Feb 13, 2012)

perfect OBP, this is just what I need. Now there's just this three question I have for this issue:
1. I get this type of thing every time I open office file with macro in it (see attachment), so I need to click the Option>Enable Macro. Is there anything I can do to make the macro run automatically every time I open the file?
2. To make everything close when I click "Close Form", can I just delete the "show" macro?
3. If I want my other database to be like that, I need to make exactly the same code in module1 and two macro. Is this right? Or I just need to create the two macro without module1?

So many thanks!!


----------



## Jayabhadra (Feb 13, 2012)

Sorry forget to attach


----------



## OBP (Mar 8, 2005)

You are correct both macros and the Module, or at least the code from that module in one of your own.

I think that message is a Security Level Issue, you may hvae to lower. See this PDF document.
http://www.cworks.com.my/FAQ/Enabling Macro in Access 2007.pdf


----------



## Jayabhadra (Feb 13, 2012)

Is the VBA in Form module necessary to be copied too?


----------



## Jayabhadra (Feb 13, 2012)

I have erased the "Show" macro. The pop up form window is closed but access window is still open in task bar. How to completely close everything? which part of the code should I delete?


----------

