Click here to Skip to main content
15,895,772 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a form in VB with student_id, student_RefNo. When a user clicks on new, I want the student_refno textbox to autogenerate the refernce number with the format R/001 and everytime a user clicks on new, the textbox field increments by 1. Am using SQL database to store the students data.


Please help on working this out.
Posted
Comments
[no name] 22-Feb-13 4:18am    
what logic have you tried for achieving above task..??
BreeM 22-Feb-13 4:37am    
I had tried this:
Dim SQL at string
SQL="select max(student_refno) from student"
txtRefNo= "R/" & sql + 1

1 solution

You dint wrote code for Command Reader and Execution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900