- Joined
- Apr 21, 2012
- Messages
- 3
- Reaction score
- 0
I call a form from a sub form on Form1 by clicking on a Hyperlink, passing the linked value as a filter in the DoCmd.OpenForm statement:
strSql = "SELECT tblMarker.*, tblLot.LotNumber " _
& " FROM tblLot INNER JOIN tblMarker " _
& " ON tblLot.LotID = tblMarker.mLotID " _
& " WHERE (((tblLot.LotNumber)= " & Me.LotNumberTested & "));"
DoCmd.OpenForm "frmTest Results", acNormal, strSql
Then in the Form_Open event for frmTest Results, I set focus to a specific control.
The form opens, displays the correct information but the cursor does not show up. The form, although open and on top of Form1, apparently does not have focus. If I click anywhere on the new form, the proper control then shows it has focus.
I have also tried to force the form to have focus by using Me.SetFocus as well as making Form1 not visible thinking it was somehow retaining its focus.
Why does the new form not have focus? What am I missing?
Thanks for any advice!
strSql = "SELECT tblMarker.*, tblLot.LotNumber " _
& " FROM tblLot INNER JOIN tblMarker " _
& " ON tblLot.LotID = tblMarker.mLotID " _
& " WHERE (((tblLot.LotNumber)= " & Me.LotNumberTested & "));"
DoCmd.OpenForm "frmTest Results", acNormal, strSql
Then in the Form_Open event for frmTest Results, I set focus to a specific control.
The form opens, displays the correct information but the cursor does not show up. The form, although open and on top of Form1, apparently does not have focus. If I click anywhere on the new form, the proper control then shows it has focus.
I have also tried to force the form to have focus by using Me.SetFocus as well as making Form1 not visible thinking it was somehow retaining its focus.
Why does the new form not have focus? What am I missing?
Thanks for any advice!