Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Opening a DB without the access window

24 views
Skip to first unread message

JackonLI

unread,
Jun 11, 2009, 4:35:22 AM6/11/09
to
I seem to recall in an earlier version of Access that there was a way
to open a DB without the Access window.

If anyone could help me with this, in 2007, I would really
appreciate it.

JackonLI

Albert D. Kallal

unread,
Jun 11, 2009, 7:06:40 AM6/11/09
to
<JackonLI> wrote in message
news:37g135pb63b3co5he...@4ax.com...

You can kind of do this, but the results caused so many restrictions and
problems in coding an use of forms, that I really don't recommend this.

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc). Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

(there is a 2007 example in the above also)

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.
You can get this at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html


I think if you also maximize all your forms, then users will never see the
background anyway. The above sample does not use maximized forms...but it
really should, especially now that in 2007 the controls can "grow" when you
re-size the form.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOO...@msn.com


JackonLI

unread,
Jun 11, 2009, 12:00:12 PM6/11/09
to
Thanks for your reply, but, unless I'm doing something wrong the
Access Window is still visible. The controls are not but the actual
window is still there. I am trying to open the database as an
application that only shows the form. Thanks again.

AKN_39

unread,
Jun 11, 2009, 1:27:00 PM6/11/09
to
On Jun 11, 9:00 am, JackonLI wrote:
> Thanks for your reply, but, unless I'm doing something wrong the
> Access Window is still visible.  The controls are not but the actual
> window is still there.  I am trying to open the database as an
> application that only shows the form. Thanks again.
>
> On Thu, 11 Jun 2009 05:06:40 -0600, "Albert D. Kallal"
>

You could check out the API - Manipulate Access Window (code courtesy
of Dev Ashish) which gives you some options to hide and minimize the
main Access Window. See:

http://www.mvps.org/access/api/api0019.htm

I hope this helps. . .

Tony N.

Salad

unread,
Jun 11, 2009, 1:30:37 PM6/11/09
to
JackonLI wrote:
> Thanks for your reply, but, unless I'm doing something wrong the
> Access Window is still visible. The controls are not but the actual
> window is still there. I am trying to open the database as an
> application that only shows the form. Thanks again.
>
Rewrite the application in another language.

JackonLI

unread,
Jun 11, 2009, 6:44:19 PM6/11/09
to
On Thu, 11 Jun 2009 10:27:00 -0700 (PDT), AKN_39 <tony...@gmail.com>
wrote:

Thanks Tony,

From what the page says this is what I'm looking for. Unfortunately I
have no clue how to implement it. I tried creating a function but
when I pasted the code in, the four "Global Const" items were red.
And I'm not sure how to call a function either.

Thanks again

JackonLI

AKN_39

unread,
Jun 11, 2009, 7:07:12 PM6/11/09
to
On Jun 11, 3:44 pm, JackonLI wrote:
> On Thu, 11 Jun 2009 10:27:00 -0700 (PDT), AKN_39 <tonyna...@gmail.com>

JackonLI: I have used this code in a couple of Access 2003 and 2007
projects and it has worked well for me. You need to create a module -
Visual Basic => Insert => Module - and then paste in the statements
from Code Start to Code End. After this you should be able call
fSetAccessWindow (for instance from a designated Start Up form) and
invoke the required setting. For example, to minimize Access (so that
it shows as an entry in the Task Bar, and displays the form only) use:
fSetAccessWindow (SW_SHOWMINIMIZED).

Good luck. . .


JackonLI

unread,
Jun 11, 2009, 9:05:50 PM6/11/09
to
On Thu, 11 Jun 2009 16:07:12 -0700 (PDT), AKN_39 <tony...@gmail.com>
wrote:

>On Jun 11, 3:44�pm, JackonLI wrote:


OK. I created the module. I created an Event Procedure with

fSetAccessWindow(SW_HIDE)

and when I run the database the form is hidden but the Access Database
window is there.

I did designate the form as the startup form.

;-(

AKN_39

unread,
Jun 12, 2009, 1:26:22 AM6/12/09
to
On Jun 11, 6:05 pm, JackonLI wrote:
> On Thu, 11 Jun 2009 16:07:12 -0700 (PDT), AKN_39 <tonyna...@gmail.com>

JackonLI: Hmm. . . I'm not sure how you could create the combination
where the Access window displays and the form is hidden. Have you
tried the SW_SHOWMINIMIZED option? The forms must be Popup and Modal
for this to work. Also, when you do get it working, if you have
reports in the database, you may have to display the Access window for
them to work. My only suggestion is to ensure that the forms are Popup
and Modal and then experiment with the different settings - as I
mentioned in my previous post, it has worked successfully for me
without any additional parameter settings or other coding.

Regards. . .

Tony N.

JackonLI

unread,
Jun 12, 2009, 12:45:00 PM6/12/09
to
On Thu, 11 Jun 2009 22:26:22 -0700 (PDT), AKN_39 <tony...@gmail.com>
wrote:

>
>


>JackonLI: Hmm. . . I'm not sure how you could create the combination
>where the Access window displays and the form is hidden. Have you
>tried the SW_SHOWMINIMIZED option? The forms must be Popup and Modal
>for this to work. Also, when you do get it working, if you have
>reports in the database, you may have to display the Access window for
>them to work. My only suggestion is to ensure that the forms are Popup
>and Modal and then experiment with the different settings - as I
>mentioned in my previous post, it has worked successfully for me
>without any additional parameter settings or other coding.
>
>Regards. . .
>
>Tony N.


I really hate to keep bothering you on this, but I seem to be close.

I created the Module (should this be a class module?) I did the
regular one.

Pasted the code from start to finish,

In the forms "On Open" property I placed
fSetAccessWindow (SW_SHOWMINIMIZED)

I am getting the following error
"Expected Variable or Procedure, Not Module"

I know I'm making some really dumb mistake here, but I am lost.

Jackonli

AKN_39

unread,
Jun 12, 2009, 2:07:06 PM6/12/09
to
On Jun 12, 9:45 am, JackonLI wrote:
> On Thu, 11 Jun 2009 22:26:22 -0700 (PDT), AKN_39 <tonyna...@gmail.com>

Jackonli: It sounds like you are having fun! No, it doesn't have to be
a Class Module, but I believe you can get that error message when you
have saved the Module with the same name as the Function. So if you
have named the module fSetAccessWindow, that would probably give you
these symptoms, and the solution would be to rename it to something
other than the Function name e.g. modfSetAccessWindow.

Good luck. . .

Tony N.

JackonLI

unread,
Jun 12, 2009, 4:37:22 PM6/12/09
to
>
>Jackonli: It sounds like you are having fun! No, it doesn't have to be
>a Class Module, but I believe you can get that error message when you
>have saved the Module with the same name as the Function. So if you
>have named the module fSetAccessWindow, that would probably give you
>these symptoms, and the solution would be to rename it to something
>other than the Function name e.g. modfSetAccessWindow.
>
>Good luck. . .
>
>Tony N.


OK. I created a new database, 1 table, 1 forn and the Module.

It didn't work the way it is supposed to. I kept getting an error
message that window could not be hidden without a form open.
I also tried calling for On Open and On Load.

I created 2 buttons on the form. One with the call to Hide and the
other with the code to Show. Worked like a charm, but this is very
cumbersome and sort of defeats the purpose.

The name of the module was not the same as the code in either of the
DB's.

The thing that bothers me the most is it seems there are many people
out there that get this to work no problem.

JackonLI

AKN_39

unread,
Jun 12, 2009, 5:51:20 PM6/12/09
to

JackonLI: I tried the same combination that you describe - new
database, the fSetAccessWindow module and a form - and when I put
fSetAccessWindow (SW_SHOWMINIMIZED) in the Form Open event, it works
as advertised. I can reproduce your error (i.e. cannot hide without
form on screen etc) if I specify an invalid argument e.g.
(SW_MINIMIZED).

So, I am sort of out of ideas, but my suggestion would be to double
check the fSetAccessWindow parameter, and if that looks OK, search
this and other Access forums for fSetAccessWindow and/or the error
message - maybe there is a conflict with the module code and another
Access specification.

I hope you are able to resolve this. . .

Tony N.

JackonLI

unread,
Jun 12, 2009, 9:31:31 PM6/12/09
to
On Fri, 12 Jun 2009 14:51:20 -0700 (PDT), AKN_39 <tony...@gmail.com>
wrote:

>On Jun 12, 1:37�pm, JackonLI wrote:


Just an update. I always copied and pasted from the module.
Anyway, I have been trying to get the window to "hide" all this time.
I then decided to try the SW_SHOWMINIMIZED, and guess what.

Yes indeed. It worked. It's not perfect since it shows in the
taskbar, but it clears the screen except for the form.

I'm just curious why the SW_HIDE doesn't work. I will do as you
suggested, and search fSetAccessWindow on the Internet.

Thank you so much for your patients, and ALL of you help.

JackonLI

AKN_39

unread,
Jun 12, 2009, 11:43:48 PM6/12/09
to
On Jun 12, 6:31 pm, JackonLI wrote:
> On Fri, 12 Jun 2009 14:51:20 -0700 (PDT), AKN_39 <tonyna...@gmail.com>

JackonLI: I'm pleased to hear you have arrived at a workable solution.
I went back and retried the test database using SW_HIDE instead of
SW_SHOWMINIMIZED and I get the same error that you reported (cannot
hide etc.) - I don't know why it acts in this way. My preference is to
minimize rather than hide completely. If you hide completely and you
have several applications open, the only way to return to the Access
database is using ALT+TAB to display and select active programs. But
if you minimize, it acts like any other application and you can
redisplay it by clicking on the Task Bar entry.

Anyway, congratulations on persevering - ain't Access wonderful!!

Tony N.

JackonLI

unread,
Jun 13, 2009, 12:30:25 AM6/13/09
to
On Fri, 12 Jun 2009 20:43:48 -0700 (PDT), AKN_39 <tony...@gmail.com>
wrote:

>On Jun 12, 6:31�pm, JackonLI wrote:


Well, it took a bit of searching for " fSetAccessWindow" as you
suggested but I finally found what I needed.

Both Popup and Modal need to be Yes.

And the following code gets pasted into the forms "On Load"

Private Sub Form_Load()
Me.Visible = True
DoEvents
Call fSetAccessWindow(SW_HIDE)
End Sub

Thanks again for all your help

JackonLI

Albert D. Kallal

unread,
Jun 13, 2009, 11:54:38 AM6/13/09
to
<JackonLI> wrote in message
news:lba2351hslt97nck7...@4ax.com...

> Thanks for your reply, but, unless I'm doing something wrong the
> Access Window is still visible. The controls are not but the actual
> window is still there. I am trying to open the database as an
> application that only shows the form. Thanks again.
>

Right, but if you maximize your form, then you not see that background.


I mean all of office for about 15 years now when you use excel, word and
most of office did have a background window (so, it not like you going scare
someone).

However, just maximize your forms, and you not need nor see the
background...

In 2007, you can also choose to use the tabbed interface, and again you not
see the background window when you do this...

0 new messages