Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21358

[RESOLVED] Error in Using Option

$
0
0
Code:

Private Sub cmdPrint_Click()
If Opt1.Value = True Then
    Dim cnview As New ADODB.connection
    Dim rsview As New ADODB.Recordset

    Call connection(cnview, App.Path & "\Seeyou.mdb", "endromida")
    'Call connection(cnview, "\\SEEYOU-PC\shared\Seeyou.mdb", "endromida")
    Call Recordset(rsview, cnview, "SELECT * FROM fabric_shirt order by Fbcode asc")

    If rsview.RecordCount = 0 Then
    MsgBox "No Record Found On Query.", vbCritical, "Seeyou"
 
    Else
    Set fab_en.DataSource = rsview
    fab_en.Orientation = rptOrientLandscape
    fab_en.Show
    End If

    Set rsview = Nothing
Elseif
Opt2.Value = True
   
    Dim tcnview As New ADODB.connection
    Dim trsview As New ADODB.Recordset

    Call connection(tcnview, App.Path & "\Seeyou.mdb", "endromida")
    'Call connection(tcnview, "\\SEEYOU-PC\shared\Seeyou.mdb", "endromida")
    Call Recordset(trsview, cnview, "SELECT * FROM fabric_tro order by Fbcode asc")
   
    If trsview.RecordCount = 0 Then
        MsgBox "No Record Found On Query.", vbCritical, "Seeyou"
     
    Else
        Set fab_en.DataSource = trsview
        fab_en.Orientation = rptOrientLandscape
        fab_en.Show
    End If
   
    Set trsview = Nothing
End If
End If
End Sub


Viewing all articles
Browse latest Browse all 21358

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>