Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Tab index from subfroms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric B - 02 May 2005 03:30 GMT
I have a main form with three subforms.
Initially the tabs all work fine but after the first time the cursor enters
the subforms in the last field position ( ie two fields per record). The
cursor enters the fist record but in the second field. Do I set the tab index
on enter, exit, or ???? A little code could help since i'm relatively new !
Thanks
-- belldon@paradise.net.nz
ericb
Dirk Goldgar - 02 May 2005 04:10 GMT
> I have a main form with three subforms.
> Initially the tabs all work fine but after the first time the cursor
> enters the subforms in the last field position ( ie two fields per
> record). The cursor enters the fist record but in the second field.
>  Do I set the tab index on enter, exit, or ???? A little code could
> help since i'm relatively new ! Thanks

Eric, I strongly suggest you not post your real e-mail addres in a
public newsgroup.  Spambots and viruses scan newsgroup posts for address
to send their garbage to.

As for your problem, it arises because each subform maintains its own
"active control".  You can force the focus to go to a particular control
whenever the subform is entered by writing an event procedure for the
Enter event of the subform control (on the main form) that displays the
subform.  Here's an example:

'----- start of example code -----
Private Sub Subform1_Enter()

   Me!Subform1!FirstControlOnSubform.SetFocus

End Sub
'----- end of example code -----

In the above, "Subform1" is the name of the subform control -- which is
not necessarily the same as the name of the form object that control
displays -- and "FirstControlOnSubform" is the name of the control on
that form object that you want to have the focus whenever the subform is
entered.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.