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 / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

DoCmd.gotorecord Method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TonyB - 14 Feb 2005 17:00 GMT
Hi,
I'm creating navigation buttons in a form based upon a table.
To move through the records displayed in the form I'm using
DoCmd.GoToRecord , , acNext
This appears to be working, but I'm not getting the next record in the
displayed records highlighted. Is there a method of DoCmd that should do
this ? I couldn't spot anything in the help.
Thanks
Tony
Brian - 14 Feb 2005 20:49 GMT
When you go to the next record programmatically (as opposed to using the Tab
key to cycle through records), Access keeps the focus in the same box/control
where it was in the current record before the move.

Try adding another line after your GoToRecord: YourControlName.SetFocus.
YourControlName will be the name of the control you want to be highlighted.
This will force the program to move the focus to that control.

You could even put the ControlName.SetFocus in the Form_Current event if you
ALWAYS want the control to go to a specific control when moving from one
record to another.

> Hi,
> I'm creating navigation buttons in a form based upon a table.
[quoted text clipped - 5 lines]
> Thanks
> Tony
 
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.