refresh form

  • Thread starter Thread starter Lapchien
  • Start date Start date
L

Lapchien

I have a query that updates a field to true:

Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
DoCmd.RunCommand acCmdSaveRecord

Dim stDocName As String

stDocName = "cancel_agreements"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command15_Click:
Exit Sub

Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click

End Sub

I'd like the form to reflect this change visibly to the user - I've read up
on refresh/repaint, and added Me.Requery to my code, but the form does not
visibly show the changed records until the user has moved off the record and
back on (or by scrolling down the subform).

Is there any way to reflect this change immediately, and visibly, to the
user?

Thanks,
Lap
 
Look at

DoCmd.Requery "" 'This will be the entire form OR
DoCmd.Requery "ObjectName" 'This is an individual object.
 
Back
Top