Solved

Tab Control Re-Initializes after tabbing

Posted on 2011-09-08
2
363 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

770 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