By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Forecasting Error

P: 1
Hello everyone,

I am new here, but here is my issue. I am running a model through an outside program. The final results sheet spits into Excel. I keep geting a runtime error 429. When I choose to debug, this is what it points to:

Function GetCompanyName(DB As String, co_code As String) As String
Dim SQL$
Dim rs_CoName As Recordset

---> Set hmws = DBEngine.Workspaces(0)
Set hmdb = hmws.OpenDatabase(DB, False, True)

SQL$ = "select company_name from company where neca_id = '" & co_code & "'"
Set rs_CoName = hmdb.OpenRecordset(SQL$, dbOpenSnapshot)
If Not (rs_CoName.EOF And rs_CoName.BOF) Then
GetCompanyName = rs_CoName.Fields(0)
GetCompanyName = "Unknown"
End If
Set rs_CoName = Nothing
End Function

Where i inserted the error is where I am having the problem. Does anyone know what the problem is and how to fix it? My boss is breathing down my neck.
May 2 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.