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 Programming / January 2007

Tip: Looking for answers? Try searching our database.

Need help with passing ID back to parent form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cameron - 31 Jan 2007 16:18 GMT
Intially I pass the employee ID to a popup form to edit the employees family
particuplars. What I would like to do is when the user closes the popup form
using the close button, that the record pointer on the parent form is the
record the user intially clicked. So basically have to transfer the ID from
the popup back to the main form, but the main form is intially populated via
an embedded query.

How would I code this? And what events would I call to get this to work?
Stefan Hoffmann - 31 Jan 2007 16:30 GMT
hi Cameron,

> Intially I pass the employee ID to a popup form to edit the employees family
> particuplars. What I would like to do is when the user closes the popup form
> using the close button, that the record pointer on the parent form is the
> record the user intially clicked.
Why does the parent form change at all?

mfG
--> stefan <--
Keith Wilby - 31 Jan 2007 16:50 GMT
> Intially I pass the employee ID to a popup form to edit the employees
> family
[quoted text clipped - 8 lines]
>
> How would I code this? And what events would I call to get this to work?

Are you closing the main form when the popup opens?  That's the only reason
I can think that it's data would change (on re-opening).  Try setting it's
visible property to false instead of closing.

Regards,
Keith.
www.keithwilby.com
Cameron - 31 Jan 2007 17:07 GMT
This function opens the child form
DoCmd.OpenForm "EmployeeSkills", acNormal, , "[EmpID] = " & Me.EmpID, , , "ID"
But when the child form closes the record that triggered the above code
doesn't have focus. Instead the form repaints and the pointer repositions to
the top of the parent form.

> > Intially I pass the employee ID to a popup form to edit the employees
> > family
[quoted text clipped - 16 lines]
> Keith.
> www.keithwilby.com 
Klatuu - 31 Jan 2007 17:29 GMT
First you said popup form then you said child form.  What is a child form?
Is there, perhaps, a Requery in the EmployeeSkills form that might be
executing during this process?

When does the EmployeeSkills form return to the first record in the
recordset? When you open the popup or when you close it?
Signature

Dave Hargis, Microsoft Access MVP

> This function opens the child form
> DoCmd.OpenForm "EmployeeSkills", acNormal, , "[EmpID] = " & Me.EmpID, , , "ID"
[quoted text clipped - 22 lines]
> > Keith.
> > www.keithwilby.com 
 
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.