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

Tip: Looking for answers? Try searching our database.

Tab to control in subform - how???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Doree - 27 Nov 2006 15:39 GMT
I have a combo box on the main form.  After update of this, I would like the
focus of the cursor to move to a specific field in the subform.  I've been
trying various different .setfocus combinations with no success.

e.g. forms!frmMain!frmTimesheetInputSub!ElementCode.SetFocus

Can anyone provide the syntax?

Yours

Paul
Allen Browne - 27 Nov 2006 15:49 GMT
Each form (main and sub) has its own active control, so this is a 2 step
process:

1. Set focus to the subform control first.
(This makes the subform the active control of the main form.)

2. Set focus to the desired control in the subform.

Like this:
   Me.frmTimesheetInputSub.SetFocus
   Me.frmTimesheetInputSub.Form!ElementCode.SetFocus

If the ".Form" bit is new, see:
   Referring to Controls on a Subform
at:
   http://allenbrowne.com/casu-04.html

Signature

Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have a combo box on the main form.  After update of this, I would like
>the
[quoted text clipped - 8 lines]
>
> Paul
 
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.