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

UBound returns wrong value

P: n/a
When I run this function, I get a UBound value of 0 (zero) for
varCurriculumID. There should actually be several hundred.

Can anyone please let me know what I am missing?

Thanks!

'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>
Function FL035DailyReport()

On Error GoTo FL035DailyReport_ERR

Dim varCurriculumID As Variant
Dim rsCurriculum As New ADODB.Recordset
Dim strSQL As String

strSQL = ""
strSQL = "Select [CUR_ID] "
strSQL = strSQL & "From [DBO_CURRICULUM] "

rsCurriculum.Open strSQL, CurrentProject.Connection, adOpenStatic,
adLockReadOnly

If rsCurriculum.EOF = False Then

varCurriculumID = rsCurriculum.GetRows(rsCurriculum.RecordCount)

End If

rsCurriculum.Close
Set rsCurriculum = Nothing

FL035DailyReport_EXIT:
Exit Function

FL035DailyReport_ERR:
MsgBox Err.Number & " - " & Err.Description, vbCritical, "Error!"
Exit Function

End Function
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>

Jul 20 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.