Set focus to a textbox on form load

Figured out what the issue was. I had hid a combobox that we didn't need that was at the top of the screen with a tab stop of 1. So it was still going there first when the form loaded. I disabled the tab stop on the combobox and it fixed the problem.



________________________________
From: tkoch77 <tkoch77@...>
To: vantage@yahoogroups.com
Sent: Tuesday, November 22, 2011 10:45 AM
Subject: [Vantage] Set focus to a textbox on form load

I am creating this customization on the Issue Material Form that is launched from MES. I want the Job Number textbox to have focus when the form loads so the user can start using a scanner. Here is my code, not sure what I am doing wrong but it does not set the focus to the textbox.

   Private Sub IssueMaterialForm_Load(ByVal sender As Object, ByVal args As EventArgs)
      ' Add Event Handler Code
      Dim txtJobNum as epiTextBox = Ctype(csm.GetNativeControlReference("8eb12134-2ebc-448b-b3db-9ab81ecc4f66"),epiTextBox)
      txtJobNum.Focus()
   End Sub



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
I am creating this customization on the Issue Material Form that is launched from MES. I want the Job Number textbox to have focus when the form loads so the user can start using a scanner. Here is my code, not sure what I am doing wrong but it does not set the focus to the textbox.

Private Sub IssueMaterialForm_Load(ByVal sender As Object, ByVal args As EventArgs)
' Add Event Handler Code
Dim txtJobNum as epiTextBox = Ctype(csm.GetNativeControlReference("8eb12134-2ebc-448b-b3db-9ab81ecc4f66"),epiTextBox)
txtJobNum.Focus()
End Sub