Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferSpreadSheet Function

Status
Not open for further replies.

vza

Programmer
Joined
Aug 1, 2003
Messages
179
Location
US
I have an VB app which transfers converted Excel spreadsheets to a format acceptable foe insertion into a Access database. I use the TransferSpreadshet Function to transfer the spreadsheet (once it has been altered) into the DB. Everything worked fine when inserted into a test (temporary) table. But we I tried to add the data to my existing table (over thousands of entries) the line of code executes but nothing is transferred into the table...I am confused...Help specifically states that this function can be used to append data to an existing table...

Here is my code:
Code:
  ' ***Transfer***
        xlstr = ConvertForm.ExcelText.Text
        Range = GetUsedRange(xlstr, "Sheet1")

    ' Create Access Appilcation Object
        Set axApp = CreateObject("Access.Application")

    ' Open Access Database
        axApp.OpenCurrentDatabase ConvertForm.AccessText.Text

    ' Transfer Excel Spreadsheet to Access Database
        axApp.DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "FollowSheetInfo", ConvertForm.ExcelText.Text, True, Range

    ' Quit Access Application
        axApp.Quit
        Set axApp = Nothing

Thanks,
-vza
 
Hi,

I can't find ConvertForm or GetUsedRange in Access VB. What other libraries are you referencing?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884

Skip,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top