Only displaying the form window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I want my database to display only the form window when users open it,
without showing the user the Microsoft Access window in the background or the
database window. i tried using tools-starup- and unanebling display database
window and every toolbar, But the microsoft access windows still behind the
form. i just one the form by itself to appear so it looks more interactive by
just using the bottom provided on that switchboard or form. What code do i
need in VB?

I appreicated any help. Thanks
 
geno said:
Hi,
I want my database to display only the form window when users open it,
without showing the user the Microsoft Access window in the
background or the database window. i tried using tools-starup- and
unanebling display database window and every toolbar, But the
microsoft access windows still behind the form. i just one the form
by itself to appear so it looks more interactive by just using the
bottom provided on that switchboard or form. What code do i need in
VB?

I appreicated any help. Thanks

This imposes some cumbersome restrictions on your application, but you
can use the code at

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

to hide the Access application window. Your form must be both popup and
modal.
 
I tried changing the form to popup and modal, then putting the function
fSetaccessWindow (SW_HIDE) in the open event of the form. but the access
window still comes in the background when i open the database.
 
geno said:
I tried changing the form to popup and modal, then putting the
function fSetaccessWindow (SW_HIDE) in the open event of the form.
but the access window still comes in the background when i open the
database.

Force the form to be visible first, by setting its Visible property to
True. I have this code in the open event of a test form, which works
for me:

'----- start of example code -----
Private Sub Form_Open(Cancel As Integer)
Me.Visible = True
DoEvents
fSetAccessWindow SW_HIDE
End Sub
'----- end of example code -----
 
geno said:
I am sorry but I can not get it. can you walk me from the beginning
of the whole thing.

What part is not working? Here's what I did:

Copy the code from the web site and paste it in a new module. Save the
module, naming it "basSetAccessWindow".

Create a form.

Set its PopUp property to Yes.
Set its Modal property to Yes.

Put this code in the form's module:

'----- start of form module code -----
Option Compare Database
Option Explicit

Private Sub Form_Close()
fSetAccessWindow SW_SHOWNORMAL
End Sub

Private Sub Form_Open(Cancel As Integer)
Me.Visible = True
DoEvents
fSetAccessWindow SW_HIDE
End Sub
'----- end of form module code -----

Save the form.

Open the form, and the Access application window is hidden when the form
is displayed. Close the form, and the application window reappears.
 
I got it. Thank so much.

I was trying the codes in the sample database from access 2003 "northwind"
to see if how they work. This database has a startup form, before it goes to
the mainswitchboard. I was puting the codes in "startup" form module, and it
was not working, it was still showing the access application window. So i
decide to delete the startup form and just use the main switchboard, i put
the codes and Kaplann!!
it work.

thanks

by the way do you know how to get it to work in a situation like this
database.
 
geno said:
I got it. Thank so much.

I was trying the codes in the sample database from access 2003
"northwind" to see if how they work. This database has a startup
form, before it goes to the mainswitchboard. I was puting the codes
in "startup" form module, and it was not working, it was still
showing the access application window. So i decide to delete the
startup form and just use the main switchboard, i put the codes and
Kaplann!! it work.

thanks

by the way do you know how to get it to work in a situation like this
database.

I don't have Access 2003 installed, but if its version of the Northwind
database is like the one for Access 2002, the startup form calls a
function named OpenStartup from directly from its OnOpen property. You
can modify that function, adding these lines before the function exits:

Forms!Startup.Visible = True
DoEvents
fSetAccessWindow SW_HIDE

You should not use the code I posted for the form's Close event, because
you won't want to make the application window visible again when the
Startup form is closed.

You'll also need to make the [Main Switchboard] form PopUp and Modal, so
that when the Startup form closes and opens that form, it will be
visible event though the Access application window is hidden. I've
tried this in my Access 2002 version, and it works. In general, any
form you want to display will have to have its PopUp and Modal
properties set to Yes. Reports are a more difficult propostion, and I
don't remember offhand what te solution is for them.
 
Back
Top