Code Examples

Change Tab Order

acCmdSelectForm, acCmdTabOrder

The following function displays just the Tab Order Dialog without actually displaying the form in design mode. It could be used from a toolbar to change the tab order without displaying the form in design view. The Select Form is not strictly necessary.

'***************** Code Start *******************
' Code by Terry Wickenden

Function TBChangeTabOrder(strForm As String)

  'Avoid problems if cancel selected in Tab Order
  On Error Resume Next

  DoCmd.Echo False
  DoCmd.OpenForm "TestDesignForm", acDesign
  DoCmd.RunCommand acCmdSelectForm
  DoCmd.RunCommand acCmdTabOrder
  DoCmd.Close , , acSaveYes
  DoCmd.Echo True

End Function

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.