|
-
Mar 15th, 2001, 12:10 PM
#1
Thread Starter
Lively Member
I need help in making writing error handling or data validation for this code I'm kind of stuck..it's been a long dreary day and my brain is maxing out..
'** Run report with specified parameters
strReportPath = Trim(rsReports("ReportPath"))
Set objReports = CreateObject(strReportClass)
strPDFReport = objReports.RunReport(strReportPath, colParameters)
'****I would like to add a data validation here or *******handle an error if report doesn't run correctly.
'get user information
sSql = "select * from securityuser where userid = " & lngUserID
stat = oDB.FillRecordSet(rsUser, sSql)
If stat = 0 And (bSendEmail = True) Then
strUserNameMany(0) = rsUser("FirstName")
strUserEmailMany(0) = rsUser("email")
lngUserIDMany(0) = lngUserID
'send email to person
If (rsUser("email") <> "") Then
stat = EmailResults(strUserEmailMany(), strFreqType, strUserNameMany(), rsReportID("ReportName"), strPDFReport, lngUserIDMany(), True)
strUserPDF = strPDFReport
If strFreqType = "Now" Then
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|