I have created a project in which i am printing Hall ticket for an examination. i am using vb6.0 as front end and Access 2003 as backend. I have created a reprot in crystal reprot 8.0. I have added photographs of students in the report. Everything works fine. The only problem is, the photos are being displayed alternately in the sense that For rollno for eg. 33001 the photo displays fine. But when i Click on Next Button of CR, the rollno increments by one i.e 33002 but the photo that is displayed is of RollNo 33003 and this continues . The code that i have written is as follows:

Dim pic As StdPicture
Private Sub Section3_Format(ByVal pFormattingInfo As Object)
    Set pic = LoadPicture _
    ("D:\SrAdmn\Photos\FYBCOM\" & _
    "P11" & _
    frmResult.Adodc4.Recordset.Fields("RollNo") & ".jpg")
    Set Picture1.FormattedPicture = pic
    Set Picture4.FormattedPicture = pic
    Exit Sub
End Sub

Plz. Help.
Thanking in advance
Avinash Rooge

Edited by Ezzaral: Snipped email. Please keep it on site.

7 Years
Discussion Span
Last Post by dhaval.2cool

i have the same problem only thing is i m using visual studio 2008...so pls do help me in detialed steps that how to go about this problem...i am npt getting where to write down this code n all

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.