Solved

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

Posted on 2014-10-14
3
594 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)
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 47

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

914 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

18 Experts available now in Live!

Get 1:1 Help Now