SetFocus to a specific record in a continuous form from another form

aiikahn

Registered User.
Local time
Yesterday, 18:16
Joined
Nov 13, 2006
Messages
18
I have a tabbed continuous form from which I double-click on a record and displays all the details of the record in a separate form. When I close the form, I can go back as far as opening up the continuous form but focus is set on the first record with the code below:

Private Sub Form_Close()

DoCmd.OpenForm "Switchboard"
With Forms("Switchboard")
!tabTCN.Value = !Listing.PageIndex 'open the tab for TCN listing
End With

End Sub

How can I can close the form and setfocus on the same record I double-clicked on? Please help. Thank you much!
 
I'd probably just leave the first form open, perhaps hidden, and go back to it. You can use this method if you want to close it:

http://www.baldyweb.com/Bookmark.htm

You could probably also use GoToRecord.
 
That would be my approach, as well! Either change the first Form's Visible Property to False or simply open the second Form on top of the first, using the second Form's Popup Property.

Linq ;0)>
 
Thank you so very much, Paul and Linq! I can't believe I never thought of that in the beginning...I guess I wanted to find out more on how to do it! Thank you again!!! :)
 

Users who are viewing this thread

Back
Top Bottom