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

Me.Refresh moving record?

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
I have a command button which executes some code. The code which executes opens the current record as an ADO recordset. It then tests for certain characteristics & generates a score based on these (a risk assessment). This score is then placed in a field, & an alphabetical priority is assigned, based on the risk score. In order to reflect changes made to the record on the form, I have used a me.refresh. However this seems to move back to record one of the recordset (which is just a standard recordset in a bound form).

Has anybody else encountered this?? James Goodman
 
Hi James!

Me.Refresh will requery the recordsource, which is why it goes back to the first record. Me.Repaint will update the screen image, but I am not sure that will get you what you want either. A couple of things you could do are to store the record id in a form level variable before refreshing and open a recordset clone to find the record and set the form's bookmark to move to that record after refreshing. Or you could simply enter the new information into the text boxes on your form once you are done with the risk analysis.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Have you tried me.requery?? Mike Rohde
"I don't have a god complex, god has a me complex!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top