can a form window be moved outside of main access window?

C

crownofbees

Hi,

I'm working on a data entry form right now, and am trying to get it to
take up the smallest possible desktop footprint. Ideally, I'd like the
form to exist in a window that can be moved and resized independently
of the main Access parent window. I'm unable to figure out any way to
accomplish this in Access 2000 or 2002--it seems that the form window
has to be contained within the parent Access window. Does anyone know
any method for separating the two?

Thanks.
 
D

Douglas J Steele

I don't believe it's possible. Access is an MDI application, so the forms
can't exist outside of the application's container (although it is possible,
using APIs, to hide the Access container)
 
D

Dirk Goldgar

Hi,

I'm working on a data entry form right now, and am trying to get it to
take up the smallest possible desktop footprint. Ideally, I'd like the
form to exist in a window that can be moved and resized independently
of the main Access parent window. I'm unable to figure out any way to
accomplish this in Access 2000 or 2002--it seems that the form window
has to be contained within the parent Access window. Does anyone know
any method for separating the two?

A popup form can be moved outside the Access application window. The
PopUp property is on the Other tab of the form's property sheet in
design view.
 
C

crownofbees

Thanks Dirk! You're absolutely right. Unfortunately, the main Access
window still seems to control the pop-up form window in that if the
former is minimized, the latter goes away as well. Fie! So, your
suggestion gets me closer, but I'm still trying to figure out a way to
have the main window minimized while the form is still up...
 
D

Dirk Goldgar

Thanks Dirk! You're absolutely right. Unfortunately, the main Access
window still seems to control the pop-up form window in that if the
former is minimized, the latter goes away as well. Fie! So, your
suggestion gets me closer, but I'm still trying to figure out a way to
have the main window minimized while the form is still up...

Hmm. Well, if you don't want to hide the Access window altogether, I
expect you could resize it programmatically, and make it very small.
You'd better be careful, though, because Access seems to record its last
window size and position.
 
C

crownofbees

Dirk said:
Hmm. Well, if you don't want to hide the Access window altogether, I
expect you could resize it programmatically, and make it very small.
You'd better be careful, though, because Access seems to record its last
window size and position.

I am, as my messages have probably made abundantly clear, an Access
neophyte. Hiding the main Access window sounds like it would be a fine
solution, but I'm not sure how to go about doing this. Would this
involve some kind of vb coding behind the pop-up form's "open" event?

Thanks again for your help.
 
D

Dirk Goldgar

I am, as my messages have probably made abundantly clear, an Access
neophyte. Hiding the main Access window sounds like it would be a fine
solution, but I'm not sure how to go about doing this. Would this
involve some kind of vb coding behind the pop-up form's "open" event?

Yes. It's a bit hairy -- it's not a built-in feature of Access, so you
have to call the Windows API -- and it has limited use, but if you
really want to do it, you can use the code posted here:

http://www.mvps.org/access/api/api0019.htm
API: Manipulate Access Window

You have to paste that code into a standard module.

Note that, in more recent versions of the Windows operating system, your
form must be both PopUp and Modal. These are properties you can set on
the Other tab of the form's property sheet in design view.

You also need to ensure that your form is actually visible on the screen
when you call the function to hide the Access window. In the form I've
used to test this out, I have these event procedures for the form's Open
and Close events:

'----- start of sample code -----
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 sample code -----
 

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