issue in exporting data from Access to Excel - getting no data in excel

SKV

Active Member
Joined
Jan 7, 2009
Messages
257
Hi,

I have used this standard code many times in the past with success to export data from Access to Excel file.

StrFileName = strFilePath & "SnOP_DP_FL01_DPData" & strDateTag & ".xlsx"
DoCmd.TransferSpreadsheet acExport, 10, "tempaaaaaaaaaaaaaaa", StrFileName, True


For some reason, now when I export the data, I get a file but with NO data. the tab name comes with some weird name as A266FF2A662E84b639DA

Please advise as what I should do to fix this error
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hmm, can we see the entire section, seems like there are lines missing. Also, what version of Access and Excel?
 
Upvote 0
I have access 2010 and excel 2010. Yes there are no records in the exported excel file.
 
Upvote 0
Gina is right in that there are lines of your code that are missing (meaning you haven't posted them here), like the lines that define "strFilePath" and "strDateTag". So can you please post the entire relevant section of VBA code that applies to this?

Also, try adding this line before the "DoCmd.TransferSpreadsheet..." line:
Code:
MsgBox "There are " & DCOUNT("*","tempaaaaaaaaaaaaaaa") & " records in tempaaaaaaaaaaaaaaa to export"

And tell us what it returns.
 
Last edited:
Upvote 0
The code used to work before, I just pasted the snippet of the code in this forum. There is something else going on as the tab name (A266FF2A662E84b639DA) in the exported file has some kind of indication of the error as if you google A266FF2A662E84b639DA you will see some posts (trying to read through but not able to resolve yet).

Let me know if you still want to see the full code.

 
Upvote 0
Hmm, Google is your friend! I just put it in a Google search and see it is an issue when exporting to Excel. My thought would be once you work your way thru that if you still don't find an answer then post the whole section of code. BTW, thanks for the update!
 
Upvote 0
Thanks for responding..the code worked today (and I did not make any changes).....so dont know this was just a random issue.
 
Upvote 0

Forum statistics

Threads
1,216,309
Messages
6,130,001
Members
449,551
Latest member
MJS_53

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top