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
Else
If Opt2.Value = True Then
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