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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery makes frmCustomers go back to record 1. 8

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I have a form that shows customer info and their agent info.
If someone sees that the agent info is wrong, they can click a button which gives them a pop up screen to change the wrong information, or to add new information. They Click "OK" on the popup, and the underlying (opener) form needs to get updated to show the change/addition.

For that I'm using just plain ol'
frmCustomers.Requery

The problem is that after the underyling form is requeried, it always goes back to the first record in the underlying recordset. I want it to stay on the current record. I checked out the Bookmark property, but that doesn't work with Requery.

Can someone tell me how I get the form to stay on the current record?

thx.

SC

Ah say, there's somethin' a little "eeeeeeee" 'bout a boy who don't like basbawl...
 
hi all...
thanks for the posts, very helpful information...i did not know bookmarks exsisted (they cut my code down quite a bit), but im having a small problem...When i run this code under an Afterupdate on a combo box i get a 3021 run-time error

VarBKM = Me.RecordsetClone.Bookmark
Me.Form.Requery
Me.List4.Requery
On Error Resume Next
Me.Bookmark = VarBKM
Me.Bookmark = Me.RecordsetClone.Bookmark

oddly enough, through other controls and much messing around i found that if i added the following code BEFORE my code above i no longer recieved this error and everything worked fine

Me.RecordsetClone.FindFirst "[ID] = " & Me![List4]
Me.Bookmark = Me.RecordsetClone.Bookmark

Where ID is the primary control for the table that list4 has its rowsource from.

I was wondering if someone could possibly describe to me whats going on.

cheers,

eric



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top