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 / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

Forcing Cursor To Specific Record/Field On Continuous Screen?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
(PeteCresswell) - 18 Dec 2005 14:52 GMT
I've got a screen that has a subform containing an indeterminate number of
records.

When the user clicks "Change", I put the screen into Edit mode by unlocking all
the subform's fields, setting the subform's.AllowEdits = True, .AllowDeletions =
True, and  .AllowAdditions = True.

At this point, all the records are showing plus that empty record that becomes
visible when .AllowAdditions=True.

What I'd like to do is force the cursor to the first field in that empty record.

Anybody been here?
Signature

PeteCresswell

RoyVidar - 18 Dec 2005 14:58 GMT
(PeteCresswell) wrote in message
<vmtaq1driv36p21deg9hoefb8bn372elbr@4ax.com> :
> I've got a screen that has a subform containing an indeterminate number of
> records.
[quoted text clipped - 10 lines]
>
> Anybody been here?

I think you should be able to combine .SetFocus and gotorecord, perhaps
something like

docmd.gotorecord,,acnewrec
me.controls("txtTheFirstControl").setfocus

Signature

Roy-Vidar

(PeteCresswell) - 21 Dec 2005 01:16 GMT
Per RoyVidar:
>I think you should be able to combine .SetFocus and gotorecord, perhaps
>something like
>
>docmd.gotorecord,,acnewrec
>me.controls("txtTheFirstControl").setfocus

Bingo!
----------------------------------------------
4053        With Me.subTasks
4054           .SetFocus
4055           !txtBeginHoursMinutes.SetFocus
4056        End With
4059        DoCmd.GoToRecord , , acNewRec
----------------------------------------------

Thanks!  I had never even heard of .GoToRecord...
Signature

PeteCresswell

 
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.