R
Ryis
Hello,
I am trying to open a form based on what is in a field on a hidden form but
I cannot seem to correct it. I used the same coding principle for opening
the current form using the Me. but I am having trouble referencing the data
in the hidden form. This is what i have.
Private Sub ADMIN_MENU_Click()
If Forms!SIGNIN!LOGINBACK_subform!PERMISSION_LEVEL <> "SUPER ADMIN" Or
IsNull (Forms!SIGNIN!LOGINBACK_subform!PERMISSION_LEVEL) Then
MsgBox "YOU DO NOT HAVE AUTHORIZATION!", vbExclamation, "Try Again"
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ADMIN MENU"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Visible = True
End If
ExitPoint:
Exit Sub
ErrorPoint:
MsgBox "The following error has occurred: " _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " & Err.DESCRIPTION _
, vbExclamation, "Unexpected Error"
Resume ExitPoint
End Sub
thanks for your help in advanced
I am trying to open a form based on what is in a field on a hidden form but
I cannot seem to correct it. I used the same coding principle for opening
the current form using the Me. but I am having trouble referencing the data
in the hidden form. This is what i have.
Private Sub ADMIN_MENU_Click()
If Forms!SIGNIN!LOGINBACK_subform!PERMISSION_LEVEL <> "SUPER ADMIN" Or
IsNull (Forms!SIGNIN!LOGINBACK_subform!PERMISSION_LEVEL) Then
MsgBox "YOU DO NOT HAVE AUTHORIZATION!", vbExclamation, "Try Again"
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ADMIN MENU"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Visible = True
End If
ExitPoint:
Exit Sub
ErrorPoint:
MsgBox "The following error has occurred: " _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " & Err.DESCRIPTION _
, vbExclamation, "Unexpected Error"
Resume ExitPoint
End Sub
thanks for your help in advanced