Solved

Move/Position a control with code

Posted on 2004-04-13
4
403 Views
Last Modified: 2006-11-17
Almost all of the resolution on EE about movesize address moving or postioning forms but I need to move a subform to a new position. I can do it in the properties of the subform but not in code. Basically, when the subform is clicked, I want some data from the main form to be not visible and the subform move up and occupy it's place.

thanks,

howard
0
Comment
Question by:howcheat
[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
4 Comments
 
LVL 23

Expert Comment

by:heer2351
ID: 10816256
I guess you are trying to move the subform from code behind the subform, in that case you have to use the parent property:

  Me.Parent![subForm_CONTROL_Name].Top = 100
  Me.Parent![subForm_CONTROL_Name].Left = 100
0
 
LVL 32

Assisted Solution

by:jadedata
jadedata earned 100 total points
ID: 10816278
Greetings howcheat!

  Your requirement for the action to take when the subform is "clicked" doesn't make sense completely.
  Are you simply copying data from the subform or are you re-arranging the controls on the MAIN form?
  If the subform is the active control you may NOT be able to move it until the control has lost focus.

regards
jack
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 150 total points
ID: 10816297
Hmm, I always try to keep controls as "fixed" as possible as moding them makes the form "flickering" for the user.
Why not simply set the control's Visible property to "No" when you need to hide it ?

Nic;o)
0
 
LVL 11

Expert Comment

by:phileoca
ID: 10816417
<<<Why not simply set the control's Visible property to "No" when you need to hide it ?>>>
=) i love this method.  Great way to hide buttons for admin use only.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

756 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