Hello, I need help with writing up a code to increment a text field to read 2007-1, 2007-2, etc... I have a submit button that should increment the field when the user clicks on it. Thank you.
Well using VB you could:
Dim someStr As String() = TextBox1.Text.Split("-")
Dim secondValue As String = someStr(1)
TextBox1.Text = someStr(0) & "-" & (someStr(1) + 1)
That is the quick and dirty way to do it... I normally use javascript for this type of stuff in web pages so if you're talking ASP or whatever I dunno if that exact code will work. Works great in a VB Windows Form tho :)
Happy coding!
Adam