VB Code:
Private Sub print_Click()
Dim select_statement
select_statement = "select custname,dateofquote,custpqdetails.quoteid,product,qty,rateperlb from custpqdetails,custpq where custpqdetails.quoteid ='" & quoteid & "' and custpq.quoteid='" & quoteid & "' GROUP BY custname, dateofquote, custpqdetails.quoteid,product, qty, rateperlb;"
qry (select_statement)
count1 = rs.RecordCount
If count1 <> 0 Then
Set rptpricequote.DataSource = rs
rptpricequote.Show vbModal
Else
MsgBox "There is no such Price Quote information"
End If
End Sub