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 2007

Tip: Looking for answers? Try searching our database.

SetFocus to a text box on a sub form after loading complete

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeB - 30 May 2007 14:15 GMT
I need to be able to setfocus to a sub forms text box AFTER the Main form and
the Sub form is loaded.  It doesn't matter what event I place the 'setfocus'
- it doesnt do it.  In fact when I press the tab key (only text boxes on sub
form showing) the cursor is invisible and is no where to be found.  I imagine
I'm really on the main form (still) - somewhere.  Does anyone have the "which
event to use on the main form to place the cursor in a text box on the sub
form" after all is said and done.

thanks for any help....
Signature

MikeB

GH - 30 May 2007 14:59 GMT
> I need to be able to setfocus to a sub forms text box AFTER the Main form and
> the Sub form is loaded.  It doesn't matter what event I place the 'setfocus'
[quoted text clipped - 7 lines]
> --
> MikeB

Mike,

The Form's OnCurrent event should allow you to set the focus to the
sub form.  Also, make sure the specific control on your sub form that
you want to get initial focus is set to TabIndex 0.

- GH
Mark Anders - 30 May 2007 16:06 GMT
Mike
I used to following code on event OpenForm:
DoCmd.GoToControl (ControlName)

Signature

Have a Nice Day!

"MikeB" kirjoitti:

> I need to be able to setfocus to a sub forms text box AFTER the Main form and
> the Sub form is loaded.  It doesn't matter what event I place the 'setfocus'
[quoted text clipped - 5 lines]
>
> thanks for any help....
 
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.