?
Solved

Move/Position a control with code

Posted on 2004-04-13
4
Medium Priority
?
406 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 400 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 600 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

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