生成学生ID [英] generating student id
本文介绍了生成学生ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好!
我使用VB 6.0和MS Access作为我的后端。
请。帮助我了解如何生成每年更改的学生ID。
例如;
年度现在是2013年,学生iD的格式必须是。
13-00001....13-0000#。
但是,如果2013年已经超过学生ID的下一个格式,那么..
14-00001..... >
你可以帮我解决这个问题.ASAP.PLEASE !!! ..谢谢
解决方案
简单...
先检查年份...
如果当前年份=你当年已检查过
将学生ID增加一个
其他
新年字符串+ 00001
不要忘记使用正确语法从年份获得13或14 ..
Hello!
Im using VB 6.0 and MS Access as my back-end.
Pls. help me on how to generate student ID that change every year.
for example;
the year now is 2013 so, the format of the student iD must be.
"13-00001" .... "13- 0000#".
but if year 2013 is over the next format now of the student id is..
"14-00001" .....
can you help me on how to this.ASAP.PLEASE!!!..thanks
解决方案
Its simple...
check the year first...
if the current year = the year you have checked then
increment the student id by one
else
New year string + 00001
don't forget to use the "Right" syntax to get 13 or 14 from year fetched...
这篇关于生成学生ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文