[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

PASSWORD Routine quit working after Splitting the Database

Asked by pooky2000 in Microsoft Access Database

I am using Microsoft's Password routine for "causual" protection of forms...

After splitting the database to a frontend and backend I get a 3219 "Invalid Operation" error when entering a Password - the form
that is protected loads regardless.

Snip of the code

frmPASSWORD...
-----------------------------------------------------------------------------------------------------------------------
Option Compare Database

Private Sub CheckPassword_Click()
On Error GoTo Err_CheckPassword_Click

If IsNull(Forms!frmPassword!Text0.Value) Then
                 MsgBox "You cannot enter a blank Password. Try again."
                 Me!Text0.SetFocus
            Else
                 MyPassword = Me!Text0.Value
                 DoCmd.Close acForm, "frmPassword"
            End If

Exit_CheckPassword_Click:
    Exit Sub

Err_CheckPassword_Click:
    MsgBox Err.Description
    Resume Exit_CheckPassword_Click
   
End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click


    DoCmd.Close

Exit_Command3_Click:
    Exit Sub

Err_Command3_Click:
    MsgBox Err.Description
    Resume Exit_Command3_Click
   
End Sub

Private Sub Text0_AfterUpdate()
If IsNull(Forms!frmPassword!Text0.Value) Then
                 MsgBox "You cannot enter a blank Password. Try again."
                 Me!Text0.SetFocus
            Else
                 MyPassword = Me!Text0.Value
                 DoCmd.Close acForm, "frmPassword"
            End If

Exit_CheckPassword_Click:
    Exit Sub

End Sub

---------------------------------------------------------------------------------------

Code for the OnOpen of the protected Form - where the error occurs:

-------------------------------------------------------------------------------------------------------------------
Private Sub Form_Open(Cancel As Integer)
strRecordSource = Me.RecordSource
TTManual.SetFocus

   Dim Hold As Variant
   Dim tmpKey As Long
   Dim I As Integer
   Dim rs As DAO.Recordset
   Dim db As DAO.Database

   On Error GoTo Error_Handler
   ' Prompt the user for the Password.
   DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog
            Hold = MyPassword
' Open the table that contains the password.
   Set db = CurrentDb
   Set rs = db.OpenRecordset("tblPassword", dbOpenTable)
   rs.Index = "PrimaryKey"
   rs.Seek "=", Me.Name
   If rs.NoMatch Then
      MsgBox "Sorry cannot find password information. Try Again"
      Cancel = -1
   Else
      ' Test to see if the key generated matches the key in
      ' the table; if there is not a match, stop the form
      ' from opening.
      If Not (rs![KeyCode] = KeyCode(CStr(Hold))) Then
         MsgBox "Sorry you entered the wrong password." & _
            "Try again.", vbOKOnly, "Incorrect Password"
         Cancel = -1
      End If
   End If
   rs.Close
   db.Close
   Exit Sub

Error_Handler:
   MsgBox Err.Description, vbOKOnly, "Error #" & Err.Number
   Exit Sub
End Sub
---------------------------------------------------------------------------------------------

Any ideas where to begin?  
[+][-]01/04/05 07:52 AM, ID: 12953162Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/04/05 07:55 AM, ID: 12953201Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01/04/05 08:32 AM, ID: 12953662Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/04/05 09:17 AM, ID: 12954177Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Access Database
Sign Up Now!
Solution Provided By: routinet
Participating Experts: 3
Solution Grade: A
 
[+][-]01/05/05 08:25 AM, ID: 12963453Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/05/05 08:38 AM, ID: 12963621Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89