Rasheed Shaik
Programmer
Private rs As New ADODB.connection
Private rr As New ADODB.recordset
Private Sub cmdAcchu_Click()
Set rs = CreateObject("Adodb.connection")
rs.Provider = "Microsoft.jet.oledb.4.0"
rs.Open App.Path & "\Medrar.mdb"
'rs.Open "\\mika\medrar\Medrar.mdb"
Set rr = New ADODB.recordset
rr.Open "select * from Reser where Reno = '" & Combo1.Text & "'", rs, 1, 3
If rr.RecordCount = 0 Then
MsgBox "No record found on query.", vbCritical, "Medrar"
Else
Set Reservation.DataSource = rr
Unload Me
Reservation.Show vbModal
End If
Set rr = Nothing
End Sub
In above code when i run report, it shows only blank report with out data
Private rr As New ADODB.recordset
Private Sub cmdAcchu_Click()
Set rs = CreateObject("Adodb.connection")
rs.Provider = "Microsoft.jet.oledb.4.0"
rs.Open App.Path & "\Medrar.mdb"
'rs.Open "\\mika\medrar\Medrar.mdb"
Set rr = New ADODB.recordset
rr.Open "select * from Reser where Reno = '" & Combo1.Text & "'", rs, 1, 3
If rr.RecordCount = 0 Then
MsgBox "No record found on query.", vbCritical, "Medrar"
Else
Set Reservation.DataSource = rr
Unload Me
Reservation.Show vbModal
End If
Set rr = Nothing
End Sub
In above code when i run report, it shows only blank report with out data