Code Examples

Set Database Password


The following code opens the Set Database Password. Add the code behind a command button.

'***************** Code Start *******************
'Code Courtesy of Terry Wickenden

Private Sub cmdSetPassword_Click()
  On Error GoTo ErrHandler
  RunCommand acCmdSetDatabasePassword

  Exit Sub
  Select Case Err
    Case 2501
      'Cancel selected in dialog box - do nothing
    Case Else
      MsgBox Err.Number & ":-" & vbCrLf & Err.Description
  End Select

End Sub
'****************** 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.