Home  Fees/Services  Access Templates  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links

DoCmd Examples - Access 2007 VBA
Goto Control DoCmd

Docmd Macro VBA Example Macro DoCmd Functions



DoCmd AddMenu
DoCmd ApplyFilter
DoCmd CancelEvent
DoCmd Close
DoCmd CopyObject
DoCmd DeleteObject
DoCmd FindRecord
DoCmd FindNext
DoCmd GotoControl
DoCmd HourGlass
DoCmd Min/Max/Restore
DoCmd OpenForm
DoCmd OpenQuery
DoCmd OpenReport
DoCmd OutputTo
DoCmd RunSQL
DoCmd SendObject
DoCmd TransferDatabase
DoCmd TransferText

Create Export Specs




Docmd GotoControl Access Example

The DoCmd GoToControl method moves the cursor (sets focus to) a field or control on a form in VBA. The control name is the only option available for the Goto Control statement:

Access Docmd GotoControl Method Example

ControlName: The name of a field or a control where you desire the focus to go. The control name can be a string expression, ie., "OK_Button", as in the visual basic example above, or it can be a variable which contains the name of a control on the form - note: no spaces are allowed in the name.


Consider using the Setfocus command in place of the DoCmd.GotoControl command because the set focus command has increased functionality.

Note that you may employ the GoTo Control method to move to a subform, which is a type of control. You can then use the GoToRecord method to move to a specific record in the subform. You can also move to a control on a subform by using the GoToControl action to move first to the subform and secondly to a control within subform.

More GotoControl Examples:

NotInList Event in Microsoft Access

GoToControl "acct_name_entry" GoTo exit_it End If ' add acct DoCmd.OpenForm ("f_accts_add") Form_F_accts_Add.acct_Name = newdata Me.acct_Name_Entry = Null ...
www.blueclaw-db.com/access_notinlist_advanced_example.htm

FindFirst Recordset Visual Basic

GoToControl "Find_Combo" End Sub. Below is a short cut method which accomplishes the same Visual Basic findfirst function: ...
www.blueclaw-db.com/access_findfirst.htm
 




Site Search:

Custom Search





Templates, Examples & Case Studies

Order Management Software

Inventory Management System

Interior Design Project Management Solution

Contact Management Database Application

Construction Project Management

Lease Contract Management

Livestock Feed Inventory

CRM/Customer Relationships Management

Order Processing System

PM/Preventive Maintenance

Work Order Software

Real Estate Marketing

Reservations Management

Asbestos Survey Management System

Document Revision Management

HOA Database Template

Loan Processing Management

Student Grant Management Software

Personnel Agency Database

Prescription Assistance Plan Management

Subscription Order Management Software

Corporate Document Management Application



Contact Information

Custom Software Developers
MS Access 2007 2003 2000 All Windows Versions