Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011

    Unanswered: SourceTableName property

    My users want to start storing data that is appended to a text file by an outside process into a database. The problem is that the location and name of the file is not constant. I setup a linked text file and a couple queries that "key" the data and compare against the data already imported to determine what's new and append it.

    Problem is, even though Microshaft says you can set the source file of a linked table in code, it's generating an error. Code and Error follow:

    Code:
    CurrentDb.TableDefs("tblTemp").Connect = strConnect
    CurrentDb.TableDefs("tblTemp").SourceTableName = strTemp
    CurrentDb.TableDefs("tblTemp").RefreshLink
    Setting the Connect property works fine. The SourceTableName property, however, is kicking up an error.

    Run-time error '3268':
    Cannot set this property once the object is part of a collection.
    Am I doing this wrong?

    tc

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    I can circumvent the problem by creating a new linked table instead of modifing the existing one, but that causes a small amount of "ballooning".

    Is there a good programmatic way to either prevent, or correct the ballooning?

    tc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •