Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I wrote an excel program to run a macro in access, then import query results into excel sheet. My problem is that when I run my excel program each day, I get a new set of query data, which gets imported via my code, but the data is not changed from the day before. When I view the query results in access, the new data is present, so I'm not sure why it is not getting imported. It's like the old data keeps getting pasted, but I do not know why. I appreciate any help. I've turning on the refresh function for importing, but it doesn't do the trick. The following is my code in excel. Private Sub obtaincmmsdata_Click() Dim obtaincmmsdata As String Dim AC As Object Set AC = CreateObject("access.application") AC.Visible = False AC.opencurrentdatabase (Filename) With AC .DoCmd.RunMacro "FORD WEEKLY BTS REPORT OUT" .Quit End With Sheets("Actual").Select Range("E2").Select Selection.QueryTable.Refresh BackgroundQuery:=False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import Access query to Excel 2007 | Excel Discussion (Misc queries) | |||
Database query to import from Access to Excel | Excel Discussion (Misc queries) | |||
Vlookup problem with Access Query import into Excel 2000 | New Users to Excel | |||
access query to import to excel | Excel Worksheet Functions | |||
Link Access query to refresh an EXCEL file | New Users to Excel |