Access 97 - Recordset fields syntax.

Posted on 2005-05-12
Last Modified: 2006-11-18
Hi I am trying to link data from some spreadsheets using names included in an Access table, say recordset rsC, and named ranges in the Worksheets. My code is:

      Do Until rsC.EOF
        iName = [Field1]
        iTable = "Customer_" & iName
        DoCmd.TransferSpreadsheet acLink, 8, iTable, "C:\Filename.xls, True, iTable

Unfortunately this code does not pick Field1 (its error says "External name not defined"), neither the alternative "iName=rsC.Field1".
What can I do? Thanx.
Question by:Sar1973
    1 Comment
    LVL 1

    Accepted Solution

    How about rsc![field1]

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    728 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

    22 Experts available now in Live!

    Get 1:1 Help Now