Code Examples For RunCommand Constants

Open Link Table Dialog

acCmdLinkTables

This code displays the Link tables dialog.

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

Sub GetLink()

  On Error Goto ErrGetLink

  DoCmd.RunCommand acCmdLinkTables
  Exit Sub

ErrGetLink:

  Select Case Err
    Case 2046
      'Command not available
      MsgBox "Link Table is not available at this time.", vbCritical, "Not Available"
    Case 2501
      'Cancel selected in dialog box - do nothing
    Case Else
      MsgBox Err.Number & ":-" & vbCrLf & Err.Description
  End Select

End Sub

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