Private Sub CmdRefresh_Click()
On Error GoTo Err_CmdRefresh_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70 'This line...
Exit_CmdRefresh_Click:
Exit Sub
Err_CmdRefresh_Click:
MsgBox Err.Description
Resume Exit_CmdRefresh_Click
End Sub
Looks like you're using a much older version of Access, probably 97 PNGBill? The DoMenuItem command isn't used in newer versions, although it's only there for compatibility.
... You may also be referring to a Requery as well. So it all depends in which context you speak.
Yeap Bob, you have to follow by the OP's reques however, I did express that a requery could be what he/she requires (post #2).