Tab stop after a combo box

Q

quintully

I have two forms and in each is a combo box to select the abbreviation for the state as part of an address. I have set up the tab sequence in each form. The tab stop after the combo box on both forms is zip code. One form work, (i.e., tabs to zip code) but the other does not. The one that does not work go to tab stop zero after the state combo box
Any ideas on what can cause this behavior? I do not know what to try next
Qui
 
S

Steve Schapel

Quin,

Is the Tab Stop property of the Zip Code control set to Yes?
Is there any macro or code on the State combobox, for example the After
Update event, which explicitly sets the focus to another control?
 
Q

quintully

Answers
Is the Tab Stop property of the Zip Code control set to Yes
Yes. Tab index for State is 3 and ZIP is 4

Is there any macro or code on the State combobox, for example the After
Update event, which explicitly sets the focus to another control
No event code for State but ZIP has

Private Sub Location_ZIP_Click(
SendKeys "{HOME}
End Su

Private Sub Location_ZIP_Enter(
SendKeys "{HOME}
End Su
 
S

Steve Schapel

Quin,

Well, it's the SendKeys "{HOME}" code on the Enter event of the Zip
control that is causing this behaviour. What is the supposed purpose of
this code?
 
Q

quintully

That code is there to move the cursor to the left most character in the field when the click on it or tab to it.
 
S

Steve Schapel

Quin,

Well, it doesn't. As you have discovered. :)

Try this instead...
Me.Location_Zip.SelStart = 0
 
S

Steve Schapel

Quin,

To be precise, the other way didn't effect the tab order either! The
tab order was working fine. The focus was tabbing to the Zip textbox,
as required, and as soon as it got there, the Enter event issued a
SendKeys command to move the focus back to the beginning of the form.
 

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

Top