View Full Version : Tab from Main Form to Subform and back to Main Form


Edgar B
02-12-2002, 10:32 AM
Hi,

I hope I can explain this clearly. I have a "Main" Form. This Form has two Subforms (A and B). The Subforms I put in a tab control (Subforms are independent of one another and are only linked to the Main form). What I want to do is hit the tab key and cycle from my Main form fields to the Subform A field one. Once I reach the end of Subform A I want to be able to tab to the beginning of Subform B. When I reach the end of Subform B I want to hit the Tab button and set the focus to a command button (cmdAddRecord) which is in the Main form. I have tried coding using the setfocus however when I am in subform A I cannot get it to set the focus to subform B. Olso subform B will not set the focus back to Main Form. I am stuck in subform A hitting the tab button. I have Access 2000 and unfortunately I do not see an upgrade in future. I know using the mouse will solve the problem however that slows down the data entry people. I would like to thank you for your help in advance. Any suggestions are very much appreciated.

Side note- If I take off the navigation buttons on the subforms I keep tabbing on the same record and cannot go the next form. Else I have the navigation buttons on the subforms I tab to the next record of that subform. End if (sorry just a little VB humor)

Edgar

Jack Cowley
02-12-2002, 11:20 AM
This article may assist you with moving out of your subforms.

http://support.microsoft.com/default.aspx?scid=kb;en-us;q154893

As for your last question check the Forms Cycle property for moving in a record or between records.