Creating a Password Programmatically with SQL command : Access Environment « Access « VBA / Excel / Access / Word






Creating a Password Programmatically with SQL command

 
Sub changePassword()
   Dim myConnection As ADODB.Connection
   Dim strPassword As String

   strPassword = "ALTER DATABASE PASSWORD [smith] NULL;"

   Set myConnection = New ADODB.Connection
   With myConnection
      .Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & CurrentProject.Path & "\mydb.mdb;"
      .Execute (strPassword)
    End With
End Sub

 








Related examples in the same category

1.Changing the Access Environment
2.Use Access Special Keys
3.Changing Options
4.Change the password of the database from smith to jones
5.Add or delete users
6.Create user for Access database