Hello Guys, I hav a Code For My Report in Daily .I don't know why there is nothing show the records. even though the Error not Popup. This is My code guys. Help Me Guys

Dim rsReport1 As New ADODB.Recordset

rsReport1.Open "Select purchase_date, BarCode, Price,  ProductName, Quantity, TotalPrice From Dailyrecord where purchase_date = " & DTPicker1.Value & " ", acd, adOpenForwardOnly


If rsReport1.RecordCount > 0 Then

    Set DataReport2.DataSource = rsReport1
        With DataReport2
            .Sections("Section1").Controls("txtcode").DataField = "BarCode"
            .Sections("Section1").Controls("txtproduct").DataField = "ProductName"
            .Sections("Section1").Controls("txtqty").DataField = "Quantity"
            .Sections("Section1").Controls("txtprice").DataField = "Price"
            .Sections("Section1").Controls("txtsub").DataField = "TotalPrice"
            .Sections("Section1").Controls("txtdate").DataField = "purchase_date"
            .Show
        End With

End If

Change your select statement to -

rsReport1.Open "Select purchase_date, BarCode, Price,  ProductName, Quantity, TotalPrice From Dailyrecord where purchase_date = '" & DTPicker1.Value & "'", acd, adOpenStatic. adLockOptimistic

Hi,

Wrap date Column, with #

rsReport1.Open "Select purchase_date, BarCode, Price, ProductName, Quantity, TotalPrice From Dailyrecord where purchase_date = #" & DTPicker1.Value & "# ", acd, adOpenForwardOnly

Regards
Veena

First of all , sorry for disturbing , and now i am having some confusions regarding the following issue

very interesting topic arises here and that is

when to use adOpenStatic,adLockOptimistic and adOpenForwardOnly

in fact i've never used adOpenForwardOnly , so the question is when to use it ?

thanx in advance ?

thanx for providing a meaning link that really explain about all possible values

once again thanx !

This question has already been answered. Start a new discussion instead.