A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setfocus on main form from subform?



 
 
Thread Tools Display Modes
  #1  
Old October 3rd, 2009, 04:00 PM posted to microsoft.public.access.gettingstarted
Lostguy
external usenet poster
 
Posts: 73
Default 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  
Old October 3rd, 2009, 06:00 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.