Hi,
I'm currently using vb6. i need help.
How can I increment a number in a textbox/label everytime when the form is loaded?
Suppose company_id
I want that first time when the form gets loaded Customer_id should appear in the textbox/label as C01.
Second time it should appear as C02.
Third time C03 and vice versa.
Please help.
ruudmu7 0
Newbie Poster
Recommended Answers
Jump to PostHi,
Are you using Database? and Company_id is a Field?
Jump to PostYes, Auto increment is possible, but it should be a number, i Think so. But in your case You have mixed the Number and String. So you have to do
> Get the Last Company_id
> Split it into String and Number ( C01 as C and 01)
> …
Jump to Posti m with u selvaganapathy, Select Max of Company_id , split it between character and number then increment number with 1.
All 11 Replies
selvaganapathy 31
Posting Pro
ruudmu7 0
Newbie Poster
selvaganapathy 31
Posting Pro
ruudmu7 0
Newbie Poster
Jx_Man 987
Nearly a Senior Poster Featured Poster
selvaganapathy 31
Posting Pro
ruudmu7 0
Newbie Poster
ruudmu7 0
Newbie Poster
Jx_Man 987
Nearly a Senior Poster Featured Poster
deepak.anand71 0
Newbie Poster
khan.777 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.