Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAB index

Status
Not open for further replies.

malbreht

Technical User
Dec 8, 2006
63
0
0
SI
Hi,

My combo is a FindAsYouType combo and obviously its code overrides the tab index in the properties of the combo. Tab index is only 4, but the form always opens with this combo highlighted.

Is there any code to say, this field in this form is to be first?

Thanks, mare [thumbsup2]

P.S.: This is among others the code of the form:
Code:
Public faytCombo As FindAsYouTypeCombo

Dim bWasNewRecord As Boolean 'and other Call lines for the Allen Browne's Audit Log

Private Sub Form_Open(Cancel As Integer)

    DoCmd.GoToRecord , , acNewRec
    Set faytCombo = New FindAsYouTypeCombo
    Set faytCombo.FilterComboBox = Me.Employee_ID
    faytCombo.FilterFieldName = "Employee_ID"

End Sub
 
Hi!

If changed to 0, an error occurs:
91 Object variable or With block variable not set
I click OK and still there's this combo highlighed.

Any other ideas?

________________
Thanks,

Mare [thumbsup2]
 
What is FindAsYouTypeCombo ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
FindAsYouType combo is a combo that adjustes the list of records according to letters typed in the combo --> faq702-6304

I've still got no idea how to set this tab index...

________________
Thanks,

Mare [thumbsup2]
 
I think the combobox is on the header part of your form;If yes try moving it to detail section

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Tnx, but the combo is of course already there.

Any other ideas?

________________
Thanks,

Mare [thumbsup2]
 
You can set your reuired textbox/field ".SetFocus" on open event of the form.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
I typed:
Code:
Private Sub Form_Open(Cancel As Integer)

    DoCmd.GoToRecord , , acNewRec
    [b]Year.SetFocus[/b]
    Set faytCombo = New FindAsYouTypeCombo
    Set faytCombo.FilterComboBox = Me.Employee_ID
    faytCombo.FilterFieldName = "Employee_ID"

End Sub

It doesn't work... Is "Year.SetFocus" correctly typed or not?

________________
Thanks,

Mare [thumbsup2]
 
Year" is a reserved word in Access. You must change it to something like "txtYear".

See all words here

Code:
Me.txtYear.SetFocus
is more clear way.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Many thanks for the link and your suggestion, but it still doesn't work. There's no error, it just highlights that f*** combo instead of the txtYear field...

________________
Thanks,

Mare [thumbsup2]
 
Delete the combo and create another.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Have tried and without the combo everything works. Disabled the code for the combo, created the same combo once again, it works.

When enabling the code
Code:
    Set faytCombo = New FindAsYouTypeCombo
    Set faytCombo.FilterComboBox = Me.Employee_ID
    faytCombo.FilterFieldName = "Employee_ID"

...old story again. So obviously these 3 lines are the problem, but odd enough, this FindAsYouTypeCombo worked just fine when I built it in the form...but after some adaptions to the db all this started...

What would you do, besides giving up this special feature of the combo?

________________
Thanks,

Mare [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top