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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX code stumped

Status
Not open for further replies.

nuVBer

Programmer
Jul 6, 2001
63
US
OK, I'm stumped. I've been writing vb code for quite a while now and this is extremely easy code that is failing. Someone please tell me what I am missing here.

Function Main()

dim new_cc
dim new_acct
dim period

period = mid(DTSSource("Col001"),1, 4)
if period = 2003 Or period = 2004 then
DTSDestination("Col001") = DTSSource("Col001")
DTSDestination("Col002") = DTSSource("Col002")
new_cc = DTSLookups("New_cc" ).Execute( DTSSource"Col003") )
DTSDestination("Col003") = new_cc
DTSDestination("Col004") = DTSSource("Col004")
new_acct = DTSLookups( "New_Acct_num" ).Execute( DTSSource( "Col005" ) )
DTSDestination("Col005") = new_acct
DTSDestination("Col006") = DTSSource("Col006")
DTSDestination("Col007") = DTSSource("Col007")
DTSDestination("Col008") = DTSSource("Col008")
DTSDestination("Col009") = DTSSource("Col009")
DTSDestination("Col010") = DTSSource("Col010")

Main = DTSTransformStat_OK
Else
Main = DTSTransformStat_SkipInsert
End if

End Function


This fails at line 13 with "Error description:Invalid procedure call or argument: 'DTSSource'


 
I believe you are missing the open parenthesis on the following line:

new_cc = DTSLookups("New_cc" ).Execute( DTSSource"Col003") )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top