so, you want the registration to go through only if the orgcode that was entered already exists in the users table?
The recordset is correctly set up to check if the orgcode exists, the issue in the validation.
The numeric validation is currently set to make sure the orgcode recordset is empty.
you need to change the numeric validation. Set the minimum to 1, leave maximum blank.
This will make sure that validation passes only of the orgcode recordset is not empty.