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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wierd Tab issue

Status
Not open for further replies.

SQLSister

Programmer
Jun 18, 2002
7,292
US
I've already fixed the problem, but I still don't understand why it occurred and I was wondering if some of you who are more expert in creating forma than I am could shed some light. It bothers me when I don't understand something and this one is truly strange.

I have a form which is a subform of a tab control. It displays in continuous forms view. Even though the tab order was properly set, the tab order was not working correctly on the second (and all subsequent) records entered. It worked fine on the first record. Now this particular form is the meat of the whole application and has a ton of code behind it. One thing that happened was that the OnGotFOcus and ONLostFocus events set the value of a particular variable for several of the fields. This value awas only actually used if the ONClick Event was triggered. No code whatsoever did anything to overtly change the tab order as specified in the form. And the control the Tab order was sending it to was not one which was in the tab order (Being a calculated field) and the name of that control did not appear in any of the code.

After scratching my head and staring vacantly off into space, I deleted all the code and put it back, one event at a time until I broke the tab order. It turned out that setting the variable value was what was breaking it. The variable was a boolean variable. I changed it to a string variable and all is hunky dory. But why on earth would setting a boolean variable value (that wasn't even used if you just tabbed through the fields) break the tab order for two other controls? And why would changing it to a string variable fix it?

Questions about posting. See faq183-874
Click here to learn Ways to help with Tsunami Relief
 
How are ya SQLSister . . . . .
SQLSister said:
[blue]Even though the tab order was properly set, the tab order was [purple]not working correctly on the second (and all subsequent) records[/purple] entered.[/blue]
This is the behavior of [purple]unbound controls[/purple] in the [blue]Detail Section[/blue] of a form in [blue]Continuous View[/blue]. In fact, you should see, changing tabs in any record changes all records to the same tab. [purple]Unbound Controls[/purple] are meant for [blue]Single View[/blue]. In [blue]Continuous View[/blue], the header or footer is the only place they can properly reside.

I'm at work and have to get back to ya later on the variable problem . . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top