Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to close form in init event.(Please help)
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Trying to close form in init event.(Please help)
Miscellaneous
Thread ID:
00632822
Message ID:
00632822
Views:
37
In the init event of the form I am validating wether the person has the access to that form or not. when the code finds the person has no access then it will goto the below code which is in the init event when it foes into the below code if it satisfies then i need to close the form.(thisform.close or thisform.release) where should i write this can i write in the init event or some other event.

IF mViewType='NOACCESS'
=MESSAGEBOX("You do not have access to this Module.",48)
thisform.ViewType = "NOACCESS"
RETURN
ENDIF

when the mviewtype is not NOACCESS then it will goto this method.

IF NOT mViewType='NOACCESS'
thisform.setaccess
ENDIF
Next
Reply
Map
View

Click here to load this message in the networking platform