Solved

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

Posted on 2014-10-14
3
664 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Expert Comment

by:Dale Fye (Access MVP)
ID: 40381351
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
ID: 40381403
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 48

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40381958
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

710 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