0
Private Sub cmdPrint_Click()

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 [order] where Edate = #" & txtEdate.Text & "#")

    If rsview.RecordCount = 0 Then
        MsgBox "No Record Found On Query.", vbCritical, "Seeyou"

    Else

        Set DayOrds.DataSource = rsview
        DayOrds.Orientation = rptOrientLandscape
        DayOrds.Show
    End If

End Sub

Error is : No Records Found
Even there are records in database, i am trying to filter data on base of Date
Is this Query is right?

3
Contributors
2
Replies
9
Views
10 Months
Discussion Span
Last Post by Shark_1
0
  1. Rename your column name 'order' because ORDER is a reserve words/keyword in sql.
  2. Check your date format (Edate = #" & txtEdate.Text & "#")
0

@jhai_salvador: order is not here a column name . It is a table name. nothing happens because it is in square bracket.

check the field type of EDate and also if it is date type format the text properly.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.