Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2003, 11:53 AM
Authorized User
 
Join Date: Jun 2003
Posts: 54
Thanks: 2
Thanked 0 Times in 0 Posts
Default Forms -- how to return to the same record and fiel

Hi!

I have a Form with a Subform (continuous form) containing one bound text box for each field in the subform's underlying query.

On the Main form, I have a combo box which has code in the event AfterUpdate. When the combo box selection is changed, several procedures are executed that process data, followed by a REQUERY.

The biggest complaint from my users is following the requery process, Access changes the focus to the first record, first text box (field) instead of the record and field they were previously looking at.

How do you get Access to return focus to the [u]same record and text box</u> the user was previously looking at before the requery?

Thank you ahead of time!


--- Tom
__________________
--- Tom
 
Old June 10th, 2003, 11:24 AM
Authorized User
 
Join Date: Jun 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:How do you get Access to return focus to the same record and text box the user was previously looking at before the requery?
After the REQUERY, you could use:

Screen.PreviousControl.SetFocus

Hope that helps.

-Shay Shepston





Similar Threads
Thread Thread Starter Forum Replies Last Post
Return one record per value fizzerchris SQL Server 2005 4 August 17th, 2007 09:31 PM
Return to Inserted Record - FormView rit01 ASP.NET 2.0 Basics 15 January 27th, 2007 12:04 PM
Return a record that doesn't exist in a table? Unregistered SQL Server 2000 4 May 3rd, 2006 01:27 AM
Return the last record altered MikeJames42 VB How-To 1 February 13th, 2004 12:57 PM
Return a Record set into a table? morpheus Classic ASP Basics 2 November 18th, 2003 11:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.