Index: /WAeUP_SRP/base/Widgets.py
===================================================================
--- /WAeUP_SRP/base/Widgets.py	(revision 3406)
+++ /WAeUP_SRP/base/Widgets.py	(revision 3407)
@@ -1502,5 +1502,15 @@
                 s_logger.info('%s/%s entered wrong data together with PIN %s' % (member_id,ref,pin_str))
         while do:
-            if expiration_date and DateTime(expiration_date).lessThan(DateTime()):
+            if self.REQUEST.traverse_subpath:
+                screening_type_request = self.REQUEST.traverse_subpath[0]
+            else:
+                screening_type_request = 'manage'
+            if datastructure.has_key('record'):
+                applicant = datastructure['record']
+                if applicant.screening_type != screening_type_request and screening_type_request != 'manage':
+                    err = "You are using the wrong access form!"
+                    s_logger.info('%s tried to use %s application form but has applied for %s' % (ref,screening_type_request,applicant.screening_type))
+                    break
+            elif expiration_date and DateTime(expiration_date).lessThan(DateTime()):
                 if not pins(student=ref):
                     #import pdb;pdb.set_trace()
@@ -1528,9 +1538,4 @@
                 #screening_type = self.REQUEST.form.get('screening_type','unknown')
                 #screening_type = datastructure['screening_type']
-                if self.REQUEST.traverse_subpath:
-                    screening_type_request = self.REQUEST.traverse_subpath[0]
-                else:
-                    screening_type_request = 'manage'
-
                 if datastructure.has_key('record'):
                     applicant = datastructure['record']
