embedded pivot tables will not requery

C

Cameron

I have about 21 embedded pivot tables that where used to display user
information. I had to change the data linking and re-embed them for a project
my company is doing. However, when the form opens it is instructed to open
the excel spreadsheet that is embedded in it. But the data will not change
when the spreadsheet opens. I have pasted the on_load code below, how would I
pass to the excel spreadsheet that it is to requery and gather new data?

Option Compare Database
Option Explicit

Private Sub btnEdit_Click()
On Error GoTo btnEdit_Err
Me!PivotTable.Verb = acOLEVerbOpen
Me!PivotTable.Action = acOLEActivate
btnEdit_Exit:
Exit Sub
btnEdit_Err:
MsgBox Error$
Resume btnEdit_Exit
End Sub

Private Sub Form_Load()
Call btnEdit_Click
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top