Code:Private Sub cmdDinchu_Click() Set obj = New PrinterControl obj.ChngOrientationPortrait Call ConnectMe Set rs = New ADODB.Recordset rs.Open "select * from reser where res_date between '" & Text1.Text & "' and '" & Text2.Text & "' and pron Between '" & Text3.Text & "' and '" & Text4.Text & "'and pron between '" & Text5.Text & "' and '" & Text6.Text & "' and pblkno between '" & Text7.Text & "' and '" & Text8.Text & "'", con, 1, 3 If rs.RecordCount = 0 Then MsgBox "No record found on query.", vbCritical, "Medrar" Else Set Reservartion_List.DataSource = rs Unload Me Reservartion_List.Show End If Set rs = Nothing End Sub