Requery Form not Working

r24igh

Registered User.
Local time
Today, 11:19
Joined
Apr 18, 2016
Messages
16
Hi All,

I have a form that I want "refreshing" i.e. requerying to update the graphs that sit on it. I have the following but for some reason it's not working and I've tried multiple ways to solve - any help would be much appreciated:

Option Compare Database
Option Explicit
Public Sub RunExcelMacro()
Dim wb1 As Object
Set wb1 = CreateObject("Excel.Application")
With wb1
.Workbooks.Open ("StringforDB")
.Visible = True
.DoCmd.RunMacro (refreshallconnections)
.activeworkbook.Save
.activeworkbook.Close (True)
End With
Set wb1 = Nothing
End Sub
Private Sub Form_Activate()
Me.Requery
End Sub
 
I've never worked with graphs, before, so this is simply a guess, but if the 'not working' part refers to the graphs...try explicitly Requerying the Graphs; I suggest this because when you Requery a Form...Comboboxes are not Requeried...they have to be explicitly Requeried to update.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom