Solved

Tab Control Re-Initializes after tabbing

Posted on 2011-09-08
2
364 Views
Last Modified: 2012-05-12
Hi Experts,

I have a form with many-many controls, placed into tab controls - 3 pages each.

My issue is that when i move through the controls, and when i hit tab again on one of the controls, the tab controls regains focus, and wipes the entered data.  Hopwever, i can get the data when i hit Shift+Tab.

My suspicion is that I'm getting to the end of my tab order, i trigger a MoveNext event, which is a new record, but how can i prevent this?  

If my suspicion is correct, can I prevent the form from changing records,  or can I do something like

If MoveNext triggered
  Execute Move Previous
  control1.SetFocus
End If

Thank you
0
Comment
Question by:APD_Toronto
2 Comments
 
LVL 14

Accepted Solution

by:
pteranodon72 earned 500 total points
ID: 36505095
Look at you form's Cycle property in Form Design View. It is on the Other tab in the Properties window.
The default value is All Records, which describes the behavior you see -- tabbing from the last control in the tab order moves to the next (or new) record. The entry you've made does not get "wiped out", it gets saved with the previous record.

Change the Cycle property to Current Record and you'll stay on the same record but move the control with the lowest tab index.

HTH,
pT72
0
 

Author Closing Comment

by:APD_Toronto
ID: 36505254
You learn something every day - Thanks!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question