If its an Enrolment application, it must have a server and a database ??
And for enrolment, the process should be -
1) Person fills up the online enrolment form
2) On submit, he/she gets a confirmation message along with a unique enrolment number for future reference.
Then, why don't you make use of the database to query and return you next unique number ? i.e. once data stored, you can make use of the numeric primary key and add suffix as 'A'.
(Though it can be used for making back-end call for submitting the form etc.)