Solved

Move/Position a control with code

Posted on 2004-04-13
4
405 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

696 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