Go to Field?

  • Thread starter Thread starter K
  • Start date Start date
K

K

Good day

I have a two tabs in a form (FrmMain). When the user clicks on btnNewQuote I
would like it to go to the first tab and set focus on a field called
CbxSalesName.

Any help would be appreciated.

Thanks Kyle.
 
Do you have a subform on the tab, or strictly fields from the form?

If it's strictly fields from the form, the fact that it's on a tab is
irrelevent: you simply need to use

Me!CbxSalesName.SetFocus

If it's a subform, you need to set focus on the subform control first, then
on the control on the subform:

Me!SubformControlName.SetFocus
Me!SubformControlName.Form!CbxsSalesName.SetFocus
 
Thank you. One more issue I am having with this.

First Tab control in a form called frmMain I have a field called CbxTerms
and on lost focus I want to go to the next tab where there is an embeded
subform called frmProjects and in that form to a field called CbxProdutCat

Your help is appreciated.

Kyle.
 
Depending on how you added frmProjects as a subform, the name of the subform
control may be something other than frmProjects.

If

Me!frmProjects.SetFocus
Me!frmProjects.Form!CbxProdutCat.SetFocus

doesn't work, replace frmProjects with the name of the control.
 
Back
Top