|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Exporting an Access memo field to an Excel cell
I have a fairly simple application that I am building with the Access-VB editor and I am unable to get a memo field to copy over successfully. The chunk of code that is passing the access field to the excel object looks like this:
Set xlApp = New Excel.Application Set xlWkbook = xlApp.Workbooks.Open("C:\Documents and Settings\ryan.obray\Desktop\Access DB Test\Feeder.xls", 0, False) For Each xlWksheet In xlWkbook.Worksheets 'Take a value from the database and insert it into the excel document Dim rsTemp As New ADODB.Recordset rsTemp.Open "SELECT * FROM system WHERE System.System_Acronym='" & sSystem & "'", CurrentProject.Connection, adOpenStatic xlWksheet.Cells("2", "B") = rsTemp("System_Name") xlWksheet.Cells("4", "C") = rsTemp("System_Acronym") xlWksheet.Cells("4", "J") = rsTemp("System_DSD") xlWksheet.Cells("9", "A") = rsTemp("System_Description") xlWksheet.Cells("6", "B") = rsTemp("System_Type_ID") xlWksheet.Cells("6", "N") = rsTemp("System_Category_ID") xlWksheet.Cells("6", "F") = rsTemp("TEI_ID") xlWksheet.Cells("4", "P") = rsTemp("System_Last Update") Next xlWksheet Everything is fine except for the line "xlWksheet.Cells("9", "A") = rsTemp("System_Description")". When the System_Description of whatever row in the recordset is being passed is small (under 256 characters I'm assuming) it shows up fine in the cell that I specified but if it is larger than 256, "#VALUE!" is all that shows up in the cell. The System_Description is a memo field so I'm sure that has something to do with it but I don't know how to work around this. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Exporting an Access memo field to an Excel cell |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|