If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setfocus on main form from subform?
Hello! On the main form (frmEventEntry), I enter the EventDate and
then select the Event from a combobox. Then, on the continuous subform (subfrmEventEntry), I select the names of each of the employees who did that event. Then, I click the "Next Record" button on the main form. I do this over and over: Date, Event, select Employees, click Next Record. The problem is when I click Next Record and the new blank main form appears, the cursor is still in the subform instead of being "ready to go" in the EventDate field. So, my sequence ends up being: Date, Event, select Employee, click Next Record, and then click EventDate on the new record to get the cursor up there. I have put the setfocus command all over the place, but I am either getting the syntax wrong or not putting it in the correct form (or subform) Event Procedure. I appreciate any help with eliminating the extra mouse click! VR/Lost |
#2
|
|||
|
|||
Setfocus on main form from subform?
Have you tried the current event of the main form to set the focus to the
control on the main form? I might add my own button on the main form to move to the next record (or new record) and then you could use code in that to set the focus. John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County Lostguy wrote: Hello! On the main form (frmEventEntry), I enter the EventDate and then select the Event from a combobox. Then, on the continuous subform (subfrmEventEntry), I select the names of each of the employees who did that event. Then, I click the "Next Record" button on the main form. I do this over and over: Date, Event, select Employees, click Next Record. The problem is when I click Next Record and the new blank main form appears, the cursor is still in the subform instead of being "ready to go" in the EventDate field. So, my sequence ends up being: Date, Event, select Employee, click Next Record, and then click EventDate on the new record to get the cursor up there. I have put the setfocus command all over the place, but I am either getting the syntax wrong or not putting it in the correct form (or subform) Event Procedure. I appreciate any help with eliminating the extra mouse click! VR/Lost |
Thread Tools | |
Display Modes | |
|
|