show form, but no field has focus until manually click

I have a simple form, that shows a second "data entry form".  

From the main form, I show the second form using:
            Dim frmEntry As New Form1
            Me.AddOwnedForm(frmEntry)
            frmEntry.Show()

When the data entry form is shown, the first field should have the focus.  I would think that would be the default behaviour.  However, no field has focus.  It looks like the form header bar has the foucs, until I click on some field in the form.  This app is for a high volume wharehouse, and it matters to save every click and key stroke.

I checked the tab order, and made sure that my first field, was the first tab.  Also, I have even put an "Me.field1.focus()"  in the form load event, to try to force the focus.  

I am new to this, so if I'm missing something obvious, I would be happy to hear it.
Any help greatly appreciated.
down0041Asked:
Who is Participating?
 
SanclerConnect With a Mentor Commented:
Though you'd also need a Static Boolean so that a new subForm would not load every time the mainForm was re-activated.

Roger
0
 
down0041Author Commented:
Correction.
It appears that the main form header has the focus.  (The second form is displayed on top of the main form.)
0
 
SanclerCommented:
Add
        frmEntry.Focus()
after
           frmEntry.Show()

Roger
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
down0041Author Commented:
I have actually tried that.  In looking closer at what I'm doing, I'm calling the showForm from the "form loaded event" of the first form.  I think that is creating the problem.  If I put my code in a button on the main form, then everything works as you would expect.  I am re-structering my forms, to avoid having to deal with this.
Thank you for your input.
td
0
 
SanclerCommented:
I think if you move it to the form Activated event of the main form it should work.  And it gets rid of the extra key stroke that a button on the main form involves.  If that would be easier than a restructure.

Roger
0
 
down0041Author Commented:
Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.