access |
Private Sub cmdLogin_Click() Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("") With rst If IsNull(Me.cboCurrentEmployee.Value) Then MsgBox " ! ." Exit Sub Else: .FindFirst ("ID=" & Me.cboCurrentEmployee.Value) If .NoMatch Then MsgBox " ! ." Exit Sub Else: If Me.__.Value <> .Fields("").Value Then MsgBox " " Exit Sub End If If IsNull(Me.__.Value) Then MsgBox " !" Exit Sub End If DoCmd.Close Select Case .Fields("").Value ' "" . "" Case "" DoCmd.OpenForm "" Case " " DoCmd.OpenForm "" Case " " DoCmd.OpenForm "____" End Select End If End If End With rst.Close Set rst = Nothing End Sub
http://www.sql.ru/forum/1296553/ispolzovanie-logina-i-parolya-v-access