Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make form stay on same record after requery 1

Status
Not open for further replies.

ordendelfai

Technical User
Nov 8, 2002
187
US
Hello,

I have a drop down box that changes a value in an underlying query. Using the OnChange event, I have to use Me.Requery so that a text box in the form updates to the new value that was selected. When I requery though, if I am on say, record 112, the requery sends the form back to record "1". Is there a way to stop this from happening?

If you have a better way to do this that would be great as well. I am trying to improve performance, and don't want to use a bunch of subforms like I currently am (8 for similar functions).

I have thought that maybe linking a text box to show 2 fields out of three in the combo box would be cool if possible....

Thanks!

Orden
 
I found this code through another thread. Thanks anyways :)


Dim Curr_Rec
Curr_Rec = Me.CurrentRecord

DoCmd.Echo False

Me.Requery

DoCmd.GoToRecord , , acGoTo, Curr_Rec

DoCmd.Echo True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top