Hi,
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
    frmResult.Adodc4.Recordset.MoveNext
    Exit Sub
End Sub

Plz. Help.
Thanking in advance
Avinash Rooge

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.