I am using a table named "Users" to store authorized users of the database. It has two fields named "UserName" and "UserPassword". I have constructed a simple LogOn form with two text fields named "MyUserName" and "MyPassword". The LogOn form also has an "OK" button and a "Cancel" button. I am using the following code in conjunction with the OnClick function for the "OK" button and I am getting a syntax error in the FROM clause. Please assist.
Dim rs As Recordset
Set rs = CurrentDb().OpenRecordset("SELECT Users.* FROM Users" & "WHERE(((Users.UserName)=""&Me.MyUserName&"") AND ((Users.UserPassword)=""&Me.MyPassword&"")));")
If rs.Recordset = 0 Then
MsgBox "Invalid User Name or Password"
Open Main switchboard
Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!