Combo Box and Tab Control

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

Kitty

I have a combo box on a form. The user selects a customer
from the combo box, and the input form (a tab control)
updates with information related to that customer.

Currently, the focus stays in the combo box when a name is
selected. I want focus to go to the first input box on
the tab control. The code I'm using is below.

When I run it, I get the error message, "Object doesn't
support this property or method." I'm guessing I'm
referring to the tab control incorrectly.

Thanks for any help you can provide.

Kitty

Private Sub cboSelectNext_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Record_No] = " & Str(Nz(Me!
[cboSelectNext], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Me.tabInput!txtConcurClass.SetFocus

End Sub
 
Doing this from memory:

You don't need to reference the tab control. Just
reference the control you need.

Instead of:
Me.tabInput!txtConcurClass.SetFocus

use
Me.txtConcurClass.SetFocus

Chris
 
Thanks. I'll try it.

-----Original Message-----
Doing this from memory:

You don't need to reference the tab control. Just
reference the control you need.

Instead of:
Me.tabInput!txtConcurClass.SetFocus

use
Me.txtConcurClass.SetFocus

Chris


-----Original Message-----
I have a combo box on a form. The user selects a customer
from the combo box, and the input form (a tab control)
updates with information related to that customer.

Currently, the focus stays in the combo box when a name is
selected. I want focus to go to the first input box on
the tab control. The code I'm using is below.

When I run it, I get the error message, "Object doesn't
support this property or method." I'm guessing I'm
referring to the tab control incorrectly.

Thanks for any help you can provide.

Kitty

Private Sub cboSelectNext_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Record_No] = " & Str(Nz(Me!
[cboSelectNext], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Me.tabInput!txtConcurClass.SetFocus

End Sub

.
.
 
Back
Top