Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 30th, 2003, 03:33 PM
ryano ryano is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 ryano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Exporting an Access memo field to an Excel cell


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT