Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Move/Position a control with code

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
howcheat
Asked:
howcheat
2 Solutions
 
heer2351Commented:
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
 
jadedataMS Access Systems CreatorCommented:
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
 
nico5038Commented:
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
 
phileocaCommented:
<<<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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now