Positioning Pop-up relative to form control

Q

QB

I have a form which is called as a pop-up ontop of a form. That said,
depending on resolution, whether or not the user has ribbons active or
not,... the positioning has been problematic.

What I would like to do is place the pop-up form below a know control
position 'Box239'.

I looked into using the .Top and Height properties of the control, but these
seem to be relative to the form and not the screen and as such do not
compensate for the ribbon for instance.

How can I place the pop-up at the right place. In line with the form and
below Box239?

Thank you,

QB
 
P

Piet Linden

I have a form which is called as a pop-up ontop of a form.  That said,
depending on resolution, whether or not the user has ribbons active or
not,... the positioning has been problematic.

What I would like to do is place the pop-up form below a know control
position 'Box239'.

I looked into using the .Top and Height properties of the control, but these
seem to be relative to the form and not the screen and as such do not
compensate for the ribbon for instance.

How can I place the pop-up at the right place.  In line with the form and
below Box239?

Thank you,

QB

Can you get the Top and Height of Box239? Then you can just add to
those...
 
P

Piet Linden

I have a form which is called as a pop-up ontop of a form.  That said,
depending on resolution, whether or not the user has ribbons active or
not,... the positioning has been problematic.

What I would like to do is place the pop-up form below a know control
position 'Box239'.

I looked into using the .Top and Height properties of the control, but these
seem to be relative to the form and not the screen and as such do not
compensate for the ribbon for instance.

How can I place the pop-up at the right place.  In line with the form and
below Box239?

Thank you,

QB

Can you get the Top and Height of Box239? Then you can just add to
those...
 
S

Stuart McCall

QB said:
I have a form which is called as a pop-up ontop of a form. That said,
depending on resolution, whether or not the user has ribbons active or
not,... the positioning has been problematic.

What I would like to do is place the pop-up form below a know control
position 'Box239'.

I looked into using the .Top and Height properties of the control, but
these
seem to be relative to the form and not the screen and as such do not
compensate for the ribbon for instance.

How can I place the pop-up at the right place. In line with the form and
below Box239?

Thank you,

QB

This

http://www.smccall.demon.co.uk/Forms.htm#OpenUnder

will do exactly that. In your case the call would be:

DropDownForm "NameOfPopupForm", Me.Box239
 
S

Stuart McCall

QB said:
I have a form which is called as a pop-up ontop of a form. That said,
depending on resolution, whether or not the user has ribbons active or
not,... the positioning has been problematic.

What I would like to do is place the pop-up form below a know control
position 'Box239'.

I looked into using the .Top and Height properties of the control, but
these
seem to be relative to the form and not the screen and as such do not
compensate for the ribbon for instance.

How can I place the pop-up at the right place. In line with the form and
below Box239?

Thank you,

QB

This

http://www.smccall.demon.co.uk/Forms.htm#OpenUnder

will do exactly that. In your case the call would be:

DropDownForm "NameOfPopupForm", Me.Box239
 
Q

QB

Thank you for the help (I would never have come up with anything like your
code!!!). I will try it out shortly and post back if something goes wrong.

QB
 
Q

QB

Thank you for the help (I would never have come up with anything like your
code!!!). I will try it out shortly and post back if something goes wrong.

QB
 
Q

QB

I tried the code provided

When I use it as is, it open the pop-up way out of the upper bound of my
screen. I can't see 2/3 of the form.

When I comment out

' If ScreenRect.Bottom - NewTop - PopHeight < 0 Then
' NewTop = NewTop - PopHeight - WinHeight(CtlRect)
' End If

Then it is pretty close to the proper position, just a little too low.

Any reason why it wouldn't work as is? I am running Access 2003 on WinXp

QB
 
Q

QB

I tried the code provided

When I use it as is, it open the pop-up way out of the upper bound of my
screen. I can't see 2/3 of the form.

When I comment out

' If ScreenRect.Bottom - NewTop - PopHeight < 0 Then
' NewTop = NewTop - PopHeight - WinHeight(CtlRect)
' End If

Then it is pretty close to the proper position, just a little too low.

Any reason why it wouldn't work as is? I am running Access 2003 on WinXp

QB
 
S

Stuart McCall

QB said:
I tried the code provided

When I use it as is, it open the pop-up way out of the upper bound of my
screen. I can't see 2/3 of the form.

When I comment out

' If ScreenRect.Bottom - NewTop - PopHeight < 0 Then
' NewTop = NewTop - PopHeight - WinHeight(CtlRect)
' End If

Then it is pretty close to the proper position, just a little too low.

Any reason why it wouldn't work as is? I am running Access 2003 on WinXp

QB
<snip>

There are one or two limitations to the use of that code. The form
containing the control to be 'popped under' must be in form view (ie not
continuous or datasheet). Also the control must be in the form's detail
section. Make sure the form isn't too big to pop up in the required
position.

The code you commented out is to ensure the popup doesn't overlap the screen
boundary. I think that's a clue that says to make your form a bit smaller
(this is not an exact science - screen-positioning stuff in Access rarely
is).

Try playing around with control positioning and popup size & see if you can
get it right. If too much difficulty, make a new mdb (2000 to 2003 please)
and import the least that will let me see the problem, mail it to me (my
real email address is the one I use here but with 'un' removed). I'll take a
look as I have time.
 
S

Stuart McCall

QB said:
I tried the code provided

When I use it as is, it open the pop-up way out of the upper bound of my
screen. I can't see 2/3 of the form.

When I comment out

' If ScreenRect.Bottom - NewTop - PopHeight < 0 Then
' NewTop = NewTop - PopHeight - WinHeight(CtlRect)
' End If

Then it is pretty close to the proper position, just a little too low.

Any reason why it wouldn't work as is? I am running Access 2003 on WinXp

QB
<snip>

There are one or two limitations to the use of that code. The form
containing the control to be 'popped under' must be in form view (ie not
continuous or datasheet). Also the control must be in the form's detail
section. Make sure the form isn't too big to pop up in the required
position.

The code you commented out is to ensure the popup doesn't overlap the screen
boundary. I think that's a clue that says to make your form a bit smaller
(this is not an exact science - screen-positioning stuff in Access rarely
is).

Try playing around with control positioning and popup size & see if you can
get it right. If too much difficulty, make a new mdb (2000 to 2003 please)
and import the least that will let me see the problem, mail it to me (my
real email address is the one I use here but with 'un' removed). I'll take a
look as I have time.
 
Q

QB

As I mentioned in my initial post/question, those do not take into
consideration elements such as toolbars, the ribbon, form positioning,....
and thus do not work for this situation.

Thank you for your help anyways.

QB
 
Q

QB

As I mentioned in my initial post/question, those do not take into
consideration elements such as toolbars, the ribbon, form positioning,....
and thus do not work for this situation.

Thank you for your help anyways.

QB
 

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