|
Home > Archive > MS Access database support > June 2005 > Conditional Tab Order?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Conditional Tab Order?
|
|
| basstwo@gmail.com 2005-06-28, 8:25 pm |
| What is the syntax to use TabIndex? I want to have the tab order
change depending on the return of a Mid function.
| |
|
| Me!Command1.TabIndex = 0
Me!TextBox1.TabIndex = 1
TabIndex is zero-based.
| |
|
| Hmmm??? In design view, Access is forgiving (at least,
Access 97 seems to be). If I manually change a control's
tab index to 5 at a time when another control already has
an index value of 5, 97 'sees' it & automatically adjusts all
the other controls' index values for me.
But, I have not experimented and do not know for sure
whether this nicety is preserved in on-the-fly changes via
code, as it seems your objective might be. My guess is no,
it would not. Again, I haven't tested. But if I were considering
rolling this out, I think I would.
| |
| Tim Marshall 2005-06-29, 9:24 am |
| MLH wrote:
> Hmmm??? In design view, Access is forgiving (at least,
> Access 97 seems to be). If I manually change a control's
> tab index to 5 at a time when another control already has
> an index value of 5, 97 'sees' it & automatically adjusts all
> the other controls' index values for me.
Same in 2003. I've not encountered it yet in 2003, but I have had
experience with forms in A97 with large numbers of controls where Access
seemed to get confused when I did the above, to adjust the "natural tab
order" of controls on a form. I'm used to seeing, say in the above
example, the current 5 and following numbers all advance 1 on their own,
retaining the current order. However, in some instances, as I've said,
this doesn't quite happen - the previous '5' would take up some
seemingly (I didn't investigate it thoroughly) random already existing
tab number.
As to the original poster, I would suggest instead of altering the tab
order, to try and do what he's doing by either enabling/disabling
controls after the return of the mid() function. Fiddling with tab
order seems fiddly to me.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
|
|
|
|
|