Well, I thought this was going to be simple, but I guess not. (In my old vocabulary, ISAM is a mainframe access method) Anyway, I've not been successful in finding a reasonable explanation that fits what I'm trying to accomplish.
strPerDB is global and is the name of an alternate backend DB.
The error:
Code:
Code:Option Compare Database Option Explicit Public Sub CCAcctTrans() '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* ' Test new function to access CC traffic. '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* MsgBox ADDCCAccts End Sub Private Function ADDCCAccts() As Boolean '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* ' Connect to the CCTrans table temporarily to see if there's any CC traffic that ' needs to be recorded. '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* Dim tdf As New DAO.TableDef On Error GoTo LinkError With CurrentDb .TableDefs.Refresh Set tdf = .CreateTableDef("tblCCTrans") tdf.Connect = "tblCCTrans" tdf.SourceTableName = strPerDB .TableDefs.Append tdf <<<<<<<<<<<<<<<< gets the 3170 on this statement .TableDefs.Refresh End With Set tdf = Nothing ErrExit: ADDCCAccts = False Exit Function LinkError: MsgBox "Error encountered linking to CC Traffic table" & vbNewLine & _ "Description: " & Err.Description & " Error# = " & Err.Number GoTo ErrExit End Function