?
Solved

Set Subform's Top Property via VB Code

Posted on 2013-01-05
4
Medium Priority
?
440 Views
Last Modified: 2013-01-05
Hello all!

I have a Form (not a tabbed form this time).  On that Form I have 4 subforms.  Based upon a Frame option group certain of these subform's will be made visible.  However I would like to set the Top property of the subform when the AfterUpdate of the option group is selected.

The Mainform has a header.  Where I want the subform Control to appear is at 1.635" down within the Detail section.  So I attempted.

Me![subform].Top = (me.formHeader.Height + 1.635)  

However, this doesn't work.  Is there a way I can set that Subform's Top setting with Code????
0
Comment
Question by:wlwebb
[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
  • 3
4 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 38747846
You need to multiply inches by 1,440 to convert to TWIPS....

1.635 * 1440
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 2000 total points
ID: 38747849
Also, I don't think you need to include the height of the header section.

The measurement (I think) begins in the section where your control is located.


Me.subform.Top = 1.635 * 1440
0
 

Author Closing Comment

by:wlwebb
ID: 38747854
That was it!!!!!!!!!!!

And you ARE in fact correct .... the height didn't need to be in the formula!!!!!

Thanks mbiz
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38747857
Glad to help!

Your syntax was fine... but without the conversion your subform was moving by a mere smidgen.  :-)
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

765 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