Results 1 to 2 of 2

Thread: Error in MSDATASHAPE

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2010
    Posts
    40

    Error in MSDATASHAPE

    everyone...

    I am having problem with this code:
    HTML Code:
    Private Sub lvButtons_H6_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    Dim ag As String
    Call dbConek
     If Text4 = "" Or Text3 = "" Then
    
        MsgBox "Kindly Input the Academic Year", vbOKOnly, "Error in Printing"
        Text4.SetFocus
    
     Else
    ag = Text5.Text & "-" & Text6.Text
     With ar
         .Open "SHAPE {SELECT * FROM `Student_Masterlist`}  AS Student_Masterlist APPEND ({select * from Student_Masterlist order by stud_idnum}  AS Command1 RELATE 'year = '" & sort & " ' TO 'Academic_Year= '" & ag & "'') AS Command1", strConek, adOpenStatic, adLockOptimistic
            
            If .RecordCount = 0 Then
                MsgBox "No record found.", vbExclamation
            Else
                Set DataReport5.DataSource = ar
                DataReport5.Show
    
             End If
    
        
    End With
    End If
    End Sub
    I would like to print records from a single table whose year = sort and academic_year = ag...

    Thanks
    Last edited by ailensamson; Jan 19th, 2011 at 08:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width