G
Guest
Does anyone know the code I would use to tab back to the previous text box in a form?
in a form?jtd135 said:Does anyone know the code I would use to tab back to the previous text box
jtd135 said:Does anyone know the code I would use to tab back to the previous
text box in a form?
Ronald Dodge said:One little issue that you haven't taken into account with your code.
If StartCtl is on a Multi-Tab object (actually, a page object, which
is part of the Pages collection group on the Multi-Tab object), the
following line in your code will error out:
Set obj = StartCtl.Parent
Ronald Dodge said:Okay, I see your point. Guess what I dealt with before, I had a
couple of command buttons on the form level and everything else on
pages with regards to one of my forms, of which it tabbed through
everything on the page, then it went to the form level controls after
that (assuming we went from tab index of 0 on the page).
The other thing that had me think about this is the error that I ran
into with Leban's Month Calendar tool as that was my first encounter
of the error that I got, thus what led me to the creation of the
function.
Dirk Goldgar said:Which makes perfect sense, of course, if that's what you want it to do,
though as you say, you may want to look into the problem of duplicate
tab indexes. Depending on how you search the controls, you may get
exactly the behavior your want.
I'm not familiar with that control. You had an error arising from the
control-parent question?
Ronald Dodge said:My mistake, wasn't in the month calendar control, but rather in the
command color tool that he has:
Set objFormReport = Ctl.Parent
Which then when it came to the line:
If objFormReport.CurrentView <> 0 Then
It would error out as a page doesn't have the CurrentView Property.