Export to Excel - Losing Data

G

Guest

Hello,

I have a quick question. I have a table with three memo columns. In these
columns, people can enter in the database as much as they want to.

When trying to export to excel, I can only grab up to 255 characters on
these memo columns.

Is there any way that when I export to excel, I can keep all the data
without cutting some of it off?

Thanks.
 
R

Ron2006

Here is an example of one that does NOT have that problem...

DoCmd.TransferSpreadsheet _
TransferType:=acExport, _
SpreadsheetType:=acSpreadsheetTypeExcel8, _
TableName:="Export - 100 - Past Due Orders", _
filename:=reportfilename, _
HasFieldNames:=True

The key to the correction of the problem is acSpreadsheetTypeExcel8

That one allows the cell size to exceed 256.

I encountered this same problem a week ago and changeing the export
type to the above solved the problem.

Ron
 
G

Guest

Ron,

I need help with my code. This is what i have so far, I can't seem to
output the table anymore to excel. Just started programming

Private Sub Command103_Click()

DoCmd.TransferSpreadsheet , TransferType:=acExport,
SpreadsheetType:=acSpreadsheetTypeExcel8, TableName:="Export - 100 - Issues",
filename:=reportfilename, HasFieldNames:=True


End Sub
 
R

Ron2006

What you have either has to all be in one line or have the vba line
continuation characters at the end of each part.

copy and past the following in place of what you have.

DoCmd.TransferSpreadsheet _
TransferType:=acExport, _
SpreadsheetType:=acSpreadsheetTypeExcel8, _
TableName:="Export - 100 - Issues", _
filename:=reportfilename, _
HasFieldNames:=True

And also reportfilename needs to be the FULL mapping and file name
for the export file.

Such as:

reportfilename = "C:\100Issues.xls"

will put in in your root directory on the C drive.

Ron
 

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