|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Starting field on a formI have a form that does get initalized with the cursor in the proper field.
After hitting a button and calling another for I go back and clear the DS and rebuild a grid; unfortunately the active field is still the button and I need it to be in the grid. Steve Monitor the form's Activated event, and call your field's Focus() method
from within it. Private Sub MyForm_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated MyImportantField.Focus() End Sub ----- Tim Patrick Start-to-Finish Visual Basic 2005 Show quoteHide quote > I have a form that does get initalized with the cursor in the proper > field. After hitting a button and calling another for I go back and > clear the DS and rebuild a grid; unfortunately the active field is > still the button and I need it to be in the grid. > > Steve > That did the trick....
THanks, Steve Show quoteHide quote "Tim Patrick" <inva***@invalid.com.invalid> wrote in message news:e3b469760f008c8c7aadf083c02@newsgroups.comcast.net... > Monitor the form's Activated event, and call your field's Focus() method > from within it. > > Private Sub MyForm_Activated(ByVal sender As Object, ByVal e As > System.EventArgs) Handles Me.Activated > MyImportantField.Focus() > End Sub > > ----- > Tim Patrick > Start-to-Finish Visual Basic 2005 > >> I have a form that does get initalized with the cursor in the proper >> field. After hitting a button and calling another for I go back and >> clear the DS and rebuild a grid; unfortunately the active field is >> still the button and I need it to be in the grid. >> >> Steve >> > > |
|||||||||||||||||||||||