Hi I wonder if anyone can help.
I have created a Recordset to populate a field on a form from a table in the database.
Basically I have database which holds passwords for laptops. What I want is that when a new record is added into the database the password is automtically selected from a table in the database. (This table is basically a list of passwords).
I have created a Recordset im hope of acheiving this, however when I run the recordset it does not put the password into my desired textbox.
How would I achieve this?
The code is below
Private Sub Command115_Click()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = CurrentDb.OpenRecordset("SELECT [Password] FROM [tblpasswords] WHERE EncryptionID ")
With rs
While Not .EOF
Debug.Print ![Password]
.MoveNext
Wend
End With
End Sub
Thanks