Solved

goto control on a subform

Posted on 2004-04-11
1
359 Views
Last Modified: 2006-11-17
I am learning the basics of VBA.

I have a main form: frm_material_stock_groups and a subform: frm_material_group_subform


upon exiting a field  on the main form I want to go to a control on the subform named Material_Group_Description and i have tried the following line of code which does not work:

 DoCmd.GoToControl (Me!frm_material_group_subform.Form!Material_Group_Description)

Can anyone help?
0
Comment
Question by:supergooner
1 Comment
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
ID: 10800636
Hello supergooner,

To go to a control on a subform you have to do it in two steps.

Me!subformcontrolname.setfocus
me!subformcontrolname.Form!Controlname.setfocus


So in your case, assuming the subform control has the same name as the subform:

me!frm_material_group_subform.setfocus
me!frm_material_group_subform.form!Material_Group_Description.setfocus


Pete
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
What is ISQL? 6 99
Folder Replication 4 45
Stop the possibility of taking backup in MySQL on Ubuntu 1 63
SQL Update Query 23 78
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now