I make a form with authorization, in akses. This form contains a field with a login (drop-down list) and a field with a password (an ordinary text field), as well as an OK and Exit button (I will omit the text labels). The data for verification is taken from another database, the Operators table, in which there are fields (name, login, password). I have imported a table into this database (it cannot be copied to the database - according to the conditions of the assignment). Use standard methods of protection (DB passwording, etc., is also impossible). By Guglezh, I got to the point that the Ok button handler needed to hang up, roughly speaking, the VBA code, which, when clicked, does all the magic, and also launches the necessary form.
So far, I have not dealt with VBA. Found on the Internet this solution
Private Sub Кнопка8_Click() Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("Operator") With rst .FindFirst ("Логин=" & Me.Комбинированная11.Value) If .NoMatch Then MsgBox "Данный логин отсутствует в БД" Exit Sub Else If Me.Поле6.Value <> .Fields("Пароль").Value Then MsgBox "Пароль не правильный или не соответствует имени пользователя" Exit Sub End If End If End With rst.Close Set rst = Nothing End Sub After that, when the form starts, a message pops up.
invalid use of Me keyword
"Combined11" - a field with a drop-down list with logins on the form.
"Field6" - password field
"Password" - the names of the column with passwords in the table Operators
"Button8" - the button on which actually becomes a "tyk", I hang a handler on it.