How do I refresh database window in Access without using refreshd.

  • Thread starter Thread starter MikeC
  • Start date Start date
M

MikeC

AJW,

I made a couple tweaks to your code, including declaring
the variables. I had to add a reference to the Microsoft
Office Object Library. This code works for me.

Dim cBars As CommandBars
Dim cBarCtl As CommandBarButton

DoCmd.SelectObject acTable, , True

Set cBars = Application.CommandBars
Set cBarCtl = cBars.FindControl(msoControlButton, 3812)

If Not cBarCtl Is Nothing Then
cBarCtl.Execute
End If

Set cBars = Nothing
Set cBarCtl = Nothing
 
Back
Top