Refresh record while open in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box in my open form. After changing the value in the combo
box, I need my record to refresh. I'm using the below code which works great
except that it opens the first record after refreshing. How can I refresh
the open record and leave the same record open in the form? Thanks.

If IsOpen("NewPartInputfrm") Then
Forms!NewPartInputfrm.Refresh
Forms!NewPartInputfrm.Requery
End If
 
In your combo boxes after update event....

Me.Dirty = False

The dirty property states whether or not the forms current record has
changed since it was opened. If you manually set the Dirty property to
False, the form will save itself. Using Requery will reload the entire
dataset from scratch and move the pointer to the first record. Only
input to bound controls will change the Dirty value.

FYI. Up until the point you set Dirty to false, you can use the forms
Undo method to reset all bound controls.
 
Back
Top