Private Sub Кнопка4_Click()
Result = DLookup("[uID]", "Users", "[uLogin]='" & Login & "' AND [uPass]='" & Pass & "'")
If Not IsNull(Result) Then
Select Case (Forms("Старт").Controls("Login"))
Case "Гена"
DoCmd.OpenForm "Гена", acNormal
Case "Наташа"
DoCmd.OpenForm "Наташа", acNormal
End Select
Else
DoCmd.OpenForm "Нет", acNormal
End If
End Sub
|