Snowflake68
Registered User.
- Local time
- Today, 12:39
- Joined
- May 28, 2014
- Messages
- 464
I have a main navigation form called frmMain which has with 6 navigation buttons each with their own form with the NavSubForm. One of the buttons is named navSection1 and a subform named DS within the NavSubForm. On the DS subform I have a combo box called cboBillTo which I am trying to set focus on when I click on the navbutton but I cannot get the syntax correct in order to do so.
I have tried
and
immediately followed by
but above lines either say cannot find the referenced form or 'Method or data member not found'
I have this piece of code on the onClick event of the nav button to determine which control has the focus immediately after I click it and it says that navSection1 has the control. So I thought it should be simple enough to reference a control on the DS form that is held within that.:banghead:
I have tried
Code:
Forms![DS]!cboBillTo.SetFocus
and
Code:
Me.DS.setfocus
Code:
DS.cboBillTo.setfocus
but above lines either say cannot find the referenced form or 'Method or data member not found'
I have this piece of code on the onClick event of the nav button to determine which control has the focus immediately after I click it and it says that navSection1 has the control. So I thought it should be simple enough to reference a control on the DS form that is held within that.:banghead:
Code:
MsgBox Screen.ActiveControl.Name, 0, "Active Control"