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 / February 2006

Tip: Looking for answers? Try searching our database.

Set Focus to the Form not the Subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AccessIM - 28 Feb 2006 15:39 GMT
I have created a form that has three subforms.  Upon opening, the focus is on
the first field in the first subform.  I want the focus to be on a text box
that resides on the main form so that I can easily use a command button to
search the main form.  How do I set the focus to be the text box on the main
form?
Sprinks - 28 Feb 2006 16:21 GMT
In the OnOpen event procedure:

Me![YourTextBox].SetFocus

> I have created a form that has three subforms.  Upon opening, the focus is on
> the first field in the first subform.  I want the focus to be on a text box
> that resides on the main form so that I can easily use a command button to
> search the main form.  How do I set the focus to be the text box on the main
> form?
AccessIM - 28 Feb 2006 16:45 GMT
Thank you for the quick response.  That worked perfectly.

> In the OnOpen event procedure:
>
[quoted text clipped - 5 lines]
> > search the main form.  How do I set the focus to be the text box on the main
> > form?
Dirk Goldgar - 28 Feb 2006 17:04 GMT
> I have created a form that has three subforms.  Upon opening, the
> focus is on the first field in the first subform.  I want the focus
> to be on a text box that resides on the main form so that I can
> easily use a command button to search the main form.  How do I set
> the focus to be the text box on the main form?

Even easier than executing a code statement to set the focus, just make
that text box the first control in the main form's tab order.

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.