Set Ds = Db.CreateDynaset("SELECT * FROM mtUserInfo WHERE mtUserInfo.CanDelete = True and UserName like '" & txtUserName & "';") æall one line
Set Ds2 = Db.CreateDynaset("SELECT * FROM mtUserInfo")
Ds2.MoveLast
Ds2.MoveFirst
If Ds.RecordCount = 0 Then
MsgBox "Cannot locate that user name for deletion!", 16
Ds.Close
Ds2.Close
Db.Close
Exit Sub
ElseIf Ds2.RecordCount <= 1 Then
Title = App.Title
Msg = "WARNING! If you delete all users, you will not be able to sign in next time you run this application. Make sure that you always have at least one user, if you have Password Protection enabled. Click on the Cancel button to stop deletion, or the OK button to proceed with deletion." æall one line