Howto check where is my subform? (in Form1 or Report1?)

Posted on 2006-05-18
Medium Priority
Last Modified: 2012-05-05
I create a subform in Form1 and in Report1 for printing.
how can I write in the subform VBA to check Where is my subform?
in Form1 or Report1?
How can I access to Form1 or Report1 objects in the subform VBA?
Question by:yadafarin
1 Comment
LVL 66

Accepted Solution

Jim Horn earned 200 total points
ID: 16709107
This VBA code, when executed in a subform, will return the name of whatever the main form is.

msgbox Me.Parent!Name

Featured Post

Industry Leaders: 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

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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

621 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