T
Terri
I recently made a change in the user-level security in one of my groups
(allowed a report to be Read Design, and then allowed Database Open
Exclusive), and since that change, my users have been encountering the
run-time error 5 message "Invalid Form or Procedure." As administrator, I do
not get the error, so I'm thinking this must have something to do with
security, but am not sure what.
This pops up now on various form procedures which formerly worked. I cannot
find a common thread between procedures which are failing and those which are
not. I tried setting security changes back to where they were, (realizing
that the Open Exclusive might have caused some problems, I've revoked that.)
I've checked Library references, I've run Compact and Repair, to no avail.
Could this be some type of corruption on the .mdw file?
Here's an example of one form procedure that triggers the error. Again,
this was working before. The users have Open/Run and Read Design rights to
this form.
----------------------
Private Sub Form_Current()
Dim strStatus As String
strStatus = Me![Status]
Call StatusName(strStatus)
End Sub
---------------------
Private Function StatusName(strStatus As String)
Dim strStatusCd As String
strStatusCd = strStatus
Select Case strStatusCd
Case "01"
Me![StatusTxt].ForeColor = QBColor(4) 'Red
Me![StatusTxt] = "No Doc Letter-Subject Deceased"
Case "02"
Me![StatusTxt].ForeColor = QBColor(1) 'Blue
Me![StatusTxt] = "VM Subject; Holding"
Case "03"
Me![StatusTxt].ForeColor = QBColor(1) 'Blue
Me![StatusTxt] = "Unknown Institution; Checking"
End Case
End Function
(allowed a report to be Read Design, and then allowed Database Open
Exclusive), and since that change, my users have been encountering the
run-time error 5 message "Invalid Form or Procedure." As administrator, I do
not get the error, so I'm thinking this must have something to do with
security, but am not sure what.
This pops up now on various form procedures which formerly worked. I cannot
find a common thread between procedures which are failing and those which are
not. I tried setting security changes back to where they were, (realizing
that the Open Exclusive might have caused some problems, I've revoked that.)
I've checked Library references, I've run Compact and Repair, to no avail.
Could this be some type of corruption on the .mdw file?
Here's an example of one form procedure that triggers the error. Again,
this was working before. The users have Open/Run and Read Design rights to
this form.
----------------------
Private Sub Form_Current()
Dim strStatus As String
strStatus = Me![Status]
Call StatusName(strStatus)
End Sub
---------------------
Private Function StatusName(strStatus As String)
Dim strStatusCd As String
strStatusCd = strStatus
Select Case strStatusCd
Case "01"
Me![StatusTxt].ForeColor = QBColor(4) 'Red
Me![StatusTxt] = "No Doc Letter-Subject Deceased"
Case "02"
Me![StatusTxt].ForeColor = QBColor(1) 'Blue
Me![StatusTxt] = "VM Subject; Holding"
Case "03"
Me![StatusTxt].ForeColor = QBColor(1) 'Blue
Me![StatusTxt] = "Unknown Institution; Checking"
End Case
End Function