Solved

access 2013 Set Size and location of a pop-up form

Posted on 2014-10-14
3
582 Views
Last Modified: 2014-10-15
I have an access 2013 application where I have created a pop-up reference form that is opened when I get focus on a field and then closed when I lose focus - The form is a datasheet view and I would like to size the form and set its location - is there a way to do this?
0
Comment
Question by:rogerdjr
  • 2
3 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
In the forms Load event, use the move method to reposition and size the form, something like:

Private Sub Form_Load()

    Me.Move 3000, 3000, 7500, 5000
   
End Sub
0
 

Author Comment

by:rogerdjr
Comment Utility
I created this code to run on the got focus event of a control in the working form, opening a "reference form"

    DoCmd.OpenForm "CASp_zLkupImplementationPlanPriorityListFrm", acFormDS
    DoCmd.MoveSize -10080, 6480, 4320, 2160


which partially addresses the issue - two things I want to correct but I'm not sure how to do it

1) Set position relative to the control that currently has focus rather than to the available screen area (that is set the top of the reference form 1" right and at the same vertical position as the control on the working form)
2) I don't want the cursor to jump to the pop-up its just ref info.

thanks
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
You can use the form WindowTop and WindowLeft properties to get the relative position of the top left corner of a form.  Then, within the form, you have determine the relative position of the particular control you are working with, so to get the bottom of your current control, you might use something like:

me.windowTop + me.Detail.Height + me.Controls("yourControl").top + me.controls("yourControl").height

And the right side of that control might be:

me.WindowLeft + me.Controls("yourControl").Left + me.Controls("yourControl").width
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now