Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Forms and sub forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 13 Apr 2008 14:09 GMT
Hi guys
Heres the problem:-
I have a subform within a form.  When the user enters data into the last
cell of the subform I have set an Event proceedure on the Lost Focus, to
send the focus back to the parent form.  The problem is that the subform
still advances to show a blank record.  How do I send the focus back to the
parent form and keep the subform from moving to the 'next' record?

Thanks in advance.

Mike
Arvin Meyer [MVP] - 13 Apr 2008 15:14 GMT
> Hi guys
> Heres the problem:-
[quoted text clipped - 3 lines]
> still advances to show a blank record.  How do I send the focus back to
> the parent form and keep the subform from moving to the 'next' record?

This should work:

Private Sub SubformControl_LostFocus()
   Me.Parent.[Main Form Control].SetFocus
End Sub

I think it also depends upon the cycle property of the records on the 2
forms. Try experimenting a bit to determine the behavior you want to
achieve.
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Mike - 13 Apr 2008 16:18 GMT
>> Hi guys
>> Heres the problem:-
[quoted text clipped - 13 lines]
> forms. Try experimenting a bit to determine the behavior you want to
> achieve.
Thanks Arvin
I have that set already and it does not seem to wotk.  Although focus is
transfered to the correct control on the parent form, the subform still
advances to an empty record.  I need the subform to stay on the record that
has just been  updated.

Regards

Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.