General information
Title:
Error 1924 opened form is not an object
I am getting an error for using this RETURN = .F. after the message box at the bottom.
the error is (1924 - opened form is not an object.)
when a person has no access to form then this code should not allow the user into the form.
there i am getting this error.
*********this is the code i am using*********
IF NOT EMPTY(gUser)
modCode = This.SecurityMod
sGroup =this.securitygroup
sMod =this.securitymod
* CHECK IF THERE IS A ; AT THE END OF THE ACCESS
IF LEN(mAccess)<>RAT(";",mAccess)
mAccess = mAccess+";"
ENDIF
* check for group access ie change control, submittals,utilities
GroupCodeLocator = AT(";"+sGroup,mAccess)
IF GroupCodeLocator >= 1
* separate out the access for this group
mAccessString = SUBSTR(mAccess,GroupCodeLocator+2)
mAccessString = SUBSTR(mAccessString,1,AT(";",mAccessString) -1)
DO CASE
CASE LOWER(sMod)$mAccessString && EDIT ACCESS
mViewType = "EDIT"
thisform.tempfile = "TEMP"+SUBSTR(SYS(3),1,4)
CLOSE TABLES ALL
SET SAFETY OFF
***thisform.setaccess
OTHERWISE && NO ACCESS
mViewType = "NOACCESS"
IF mViewType="NOACCESS"
=MESSAGEBOX("You do not have access to this Module.")
RETURN .F.
ENDIF
ENDCASE
ENDIF
ENDIF
*********************end *******************************
Thank you.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only