Combo Box Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 combo boxes, [ArmrestID] and [CupholderID]

I have the following Code:
Private Sub ArmrestID_LostFocus()
Select Case Me.[Arm Rest ID]
Case "Cupholder"
Me.CupholderID.Visible = True
Case Else
Me.CupholderID.Visible = False
End Select
End Sub

Now if I pick "Cuphoder" from [ArmrestID] then it makes [CupholderID]
visible, and I have it as the next tab stop.
The problem is that even though it unhides [CupholderID], it skips that in
my tab stop and goes right to the next one.
How do I make it go to [CupholderID] if "Cupholder" is chosen in [ArmrestID]

Thanks in Advance
Travis
 
Hi Travis,

Fix your tab order. Go to design view and ensure that the ArmRestID combo
and the CupHolderID "tab order" are consecutive numbers, ie: if the ArmRestID
tab order is 4, make sure the Cupholder tab order is 5.

Hope this helps.

Damian.
 
Travis,

Firstly, unless your question directly relates to the question posed by the
first poster (in this case Nick), please create your own thread, rather than
piggyback on the original thread.

Now to your question...
In addition to Damian's sage advice, you could also do the following:
Private Sub ArmrestID_LostFocus()
Select Case Me.[Arm Rest ID]
Case "Cupholder"
Me.CupholderID.Visible = True
Me.CupholderID.SetFocus
Case Else
Me.CupholderID.Visible = False
End Select
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top