Solved

Can't seem to import all of the text in a cell

Posted on 2014-09-16
3
161 Views
Last Modified: 2014-09-17
I have the following code in a onclick event of a command button on a form.  But the problem I'm having is with a certain cell in the Excel file.  It has a lot of copy in it but the import function seems to be cutting it off after 255 characters.  Can someone help me?  I need to import all of the copy in that cell.  The field in the table the Excel file is being imported into is a memo field.

Here's the import code:

        Set fd = Application.FileDialog(msoFileDialogFilePicker)
        With fd
            .InitialFileName = Environ("userprofile") & "\Documents\"
            If .Show Then
            DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblTempFieldNotesImport", .SelectedItems(1), False, "A1:B66"
            End If
        End With

Open in new window

0
Comment
Question by:SteveL13
  • 2
3 Comments
 
LVL 12

Expert Comment

by:danishani
ID: 40325689
You need the change the Field Type to Memo, because Text field is limited to 255 characters.

Hope this helps,
Daniel
0
 

Author Comment

by:SteveL13
ID: 40325702
It is a memo field.
0
 
LVL 12

Accepted Solution

by:
danishani earned 500 total points
ID: 40325814
Sorry about that, this is known issue with Excel import to Access.

Truncated data

I think this link explains the solution very well, work with a temp table and than import to the final table where you want to have the records reside.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now