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!

Requery Form after adding new record

Status
Not open for further replies.

ejmiller2

Programmer
Jun 3, 2003
38
US
Hi all,


I've posted this quetion in a different thread but have a much better grasp on it, so decided to start a new thread. I am trying to Requery a Form which brings the record set to the first record. I need it to stay on that record after updating the form so i've used the bookmark (and tried absoluteposition). This code is pasted into the Afterupdate on a combo box.

VarBKM = Me.Recordset.AbsolutePosition

Me.Form.Requery
Me.List4.Requery

On Error Resume Next
Me.Recordset.AbsolutePosition = VarBKM

This works great, until I add a new record. It seem that the new record has not "officially" been added so when I try to bookmark it or get the recordsets absoluteposition before requerying the form, it's retrieving the first record. Thus, when I set the position of the record, it goes to the first record. Anyone have any suggestions?...
Thanks,

Eric
 
well i didn't solve the problem, but i did find a solution. Instead of requerying the form i just decided to requery the Recordset. I guess I was overdoing it with a form requery.

eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top