954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB.NET autogenerated item number

i want to make auto generated item number look like this
item001
item002
and so on
when i saved the item001 the next time i try to input new item it will give me item002 and so on...

Thank You.
i am using ACCESS

nullclick
Newbie Poster
2 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

Where you are saving the items in database or some where else?

Saikalyankumar
Junior Poster in Training
91 posts since Mar 2011
Reputation Points: 8
Solved Threads: 23
 
Where you are saving the items in database or some where else?


i am using access sir.

nullclick
Newbie Poster
2 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

since you are storing the data in the DB , need to read the max of existing number and increment the same by 1 to get the new number and concatenate the same with your string.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

You follow the process given by debasisdas or else make the auto increment in the access, and the get the incremented value and concatenate to the string, for auto increment to access using vb coding refer to this http://forums.asp.net/t/999557.aspx/1?How+to+Auto+Increment+a+Primary+Key+value+using+Access+and+Forms+View+in+VS+2005

Saikalyankumar
Junior Poster in Training
91 posts since Mar 2011
Reputation Points: 8
Solved Threads: 23
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: