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