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

Name tags CR 11.5

Status
Not open for further replies.

brews

Technical User
Dec 12, 2007
194
US
This code, used in vb6 & cr9, has been transported to vb6 & cr11.5 (CR XI R2 Sp6). It prints a picture that has been added to a record along with First name, Maiden name and Last name.
Code:
Private WithEvents crSection As CRAXDRT.Section
Private Report As New crNameTagsSpecialEvents

Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle
        Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(Report.Sections("DetailSection3").ReportObjects("PicFile").Value)
crSection_Format_Exit:
    Exit Sub

ErrHandle:
    If Err.Number = 53 Then
        MsgBox Err.Description & vbCrLf & _
        "Photos must be in C:\ProgramData\My Class Reunion\Photos directory.", vbCritical, "No Photos"
        Resume Next
    Else
        MsgBox Err.Description
    End If
End Sub

However, in CR 11.5 error message # 9 'Subscript out of Range' repeats for each name tag printed.Then in the report the place holder picture also repeats for each msg.

Why the action changed from CR9 to CR11.5 puzzles me. But then, so does the solution.

Any ideas would be great.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top