Autonumber and refresh form, C sharp
-
Dear Experts, I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form. The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2. Thanks for reading the entire of this passage. :) Visoth
Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner
-
Dear Experts, I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form. The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2. Thanks for reading the entire of this passage. :) Visoth
Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner
misCafe wrote:
I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form.
There is absolutely no way to do this automatically - you will have to write your own control. The only logical way I can see to do this is to have a column to show numbers, not add text to the control.
misCafe wrote:
The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2.
When your call to ShowDialog ends, you still have the dialog object and you can access it's properties. So, just expose the values you need, and grab and use them.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
misCafe wrote:
I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form.
There is absolutely no way to do this automatically - you will have to write your own control. The only logical way I can see to do this is to have a column to show numbers, not add text to the control.
misCafe wrote:
The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2.
When your call to ShowDialog ends, you still have the dialog object and you can access it's properties. So, just expose the values you need, and grab and use them.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.